[HELP] Set the speed of 2 DC motors with H-Bridge

Mats2006:
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 :slight_smile:

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.