I am currently working on an IR operated system in which I need to operate motors. However since today, the motor in question seems to refuse to rotate in both ways.
When I try uploading a sketch made to check everything is working find, the motor either rotates clockwise or counter-clockwise (depending on the order they’re written in the code) but never both.
I already used those a few times and never had this problem.
I’m using an L293D to control the motor. I attached a photo of my circuit.
It is supposed to rotate the motor in both ways for 2 seconds each but it only does it for one. Which I don’t understand since this code and setup worked perfectly fine for the last two months.
MorganS:
I can't see a ground wire from the Arduino to the breadboard
My bad, I rewired the system so the photo would be clearer and forgot to reconnect the ground pin to the breadboard. However, when I tested the system it was connected.
The red wire is connected to the 5V pin of the arduino. It serves as the L93D Logic Supply Voltage.
Yeah 9V didn't pose any form of problem until now when testing.
Could the problem come from televersing the program to the arduino? My PC is pretty old and sometimes the USB 2.0 to which my board is connected has a few bugs.
I already tried another motor, L293D and arduino so it's the last thing I can think of.