Running a Fischertechnik Encodermotor on Arduino

erfmedeiros:
+12V and ground on the L298N connected to 4 AA batteries.

4*AA = 6V, minus about 2.5V drop over the L298N leaves 3.5V for the motor. Or am I missing something?

A complete circuit diagram of your setup is also long overdue.