How do I reset check engine light on a Toyota Tacoma 2002?

take off the positive cable on the bettery and turn on the key switch for 5 minuts then put battery cable back on and the check engine light should be off