Using 1st or 2nd person is a common mistake that beginning writers often make. It is only okay to do this when your writing assignment is a personal essay.
The video below helps you understand this idea.
The following two websites help to further clarify this concept:
English Composition 1: Formal Writing Voice
Pronouns in 1st person, 2nd person, and 3rd person
How to Write in 3rd Person