Encoder for DC motor with Arduíno Mega (Photo Interrupter+L298N)