Hey, I got this motor controller, it’s an L298N motor controller. I’m trying to power a 12V 60W DC motor through it. When connecting directly to the power source, the motor runs fine, but when hooked up to the motor controller it gets weird. The motor is completely unpredictable with starting and stopping whenever I enable the pins, and sometimes just pulling out an input wire from the RPi onto the motor controller just starts it, only for it to stop when putting it back on and then either stopping on its own or just stopping randomly after putting the same wire in and out over and over.
I got my code from here:
https://www.electronicshub.org/raspberry-pi-l298n-interface-tutorial-control-dc-motor-l298n-raspberry-pi/