The above truth table must be understood.

  • If line 1A and !B are low, (0V, off) then motor 1 does not move... easy
  • If 1A is High and 1B is Low it goes forward....
  • If these are reversed it goes backwards.
  • If both are high it is off.
  • Speed is controlled by sending PWM, pulse width modulation. See the Arduion tutorial above if you have questions.
  • If you send an analogwrite(4,192) you have a 75% duty cycle so if your supply is 6 volts you average about 75% of this or 4.5 volts.
  • To use this to control speed forward, you need to have Pin 1B Low and send the PWM to 1A. Since it will be high 75% of the time you will get 4.5 *volts.
  • To get the 75% speed in revers you have to have Pin 1A low and send the PWM to pin 1B.