As part of my project I need my dc motor to reverse the direction of motion, so I have watched the following video and did the same wiring and code but the motor only rotated in one direction.
when I changed the polarity the motor also rotated in one direction but opposite to the previous one ( means it can rotate in both directions) what can go wrong that the motor is not rotating in both directions using this method?
youtube video I followed:Home Automation: Change direction of rotation of DC motor using 2 relays and Arduino - Robojax - YouTube
video and picture of my setup are atteached.
Hello abdalh216
Post your sketch, well formated, with comments and in so called code tags "</>" and schematic to see how we can help.
Have a nice day and enjoy coding in C++.
Well, with my 75 year old failing eyesight, that picture isn't worth much, maybe if you had a glass hand or ...
How about a hand drawn and photographed diagram?
All helpers work for free during their free time that is not unlimited.
Using time to watch video is a god way to make helpers uninterested. As already told, schematics and code is what helpers use.