I is used as a subjective pronoun; it is used as a subject of a verb. Here 'I' becomes the subject, 'doing' the verb.
Me is an objective pronoun and it is used for the object of the sentence. It is used for the receiver of the action of the verb.
Me can also be used as a preposition, such as 'to' or 'with'.
This confusion usually occurs when you have I/me connected to another pronoun or name with "and" or "or. " I believe that the confusion begins when someone says something like "John and me are ready" and that is corrected to "John and I are ready. " The speaker then thinks, "Oh, the word 'and' means that I should always use I. " This is not the case. "And" has nothing to do with it; the reason you say "John and I" in that sentence is that "John and I" are the subject. If they were the object, you would use me: "He told John and me to get ready. " If you are not good with grammar concepts like subject and objects, there is still a very easy way to decide whether to use I or me: try out the sentence with just I or me (or if you need a plural, we or us - "we" is equivalent to "I" and "us" is equivalent to "me. ")
Doubts on this article