DC Motor with Encoder Not Working

I tried a simple circuit where I wanted to do some encoder control of my DC Motor . My circuit is as sown below. I can measure 12V being supplied to the L298N, but when I measured the voltage on the M1 & M2 pin on the L298N, I do not see any voltage at all. I can see my sketch doing something as I physically tried to rotate the motor shaft. My encoder interrupt function gets called. Any idea what the problem is with my sketch?

It appears what you are measuring is correct. I see no connection from the power to the Arduino.

Your code?

Welcome to the forum.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Not a fritzy image.
Can you post a link to specs/data of the motor/encoder please?

Thanks.. Tom... :slight_smile: