Go Down

Topic: [HELP] Set the speed of 2 DC motors with H-Bridge (Read 1 time) previous topic - next topic


UKHeliBob


OK, the picture is in the attach.
Yes, you can control one motor, but then the other one does nothing.
And no, I don't use any sensor, just a button and a few LED's :)

Looking at your code and judging by the names used for the Arduino pins you have not wired your circuit the same as the example circuit.  That will not matter as long as you have wired the enable and inputs of the H bridge to the pins that the names in your code suggest.  ie

Arduino pin  H bridge
5                2  IN1 - motor A
4                7  IN2 - motor A
6                 1 Enable motor A

3               10 IN3 - motor B
2               15 IN4 - motor B
7                 9 Enable motor B

I suggest that you check this carefully just in case.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up