voltage sensor unstable in my code

Hi,
OPs circuit;


You cannot do that with the motor output of an H-Bridge, you are shorting one motor output terminal to GND through your voltage sensor.

Why do you want to measure the output of the H-bridge?

Tom.... :slight_smile: