Comments: Ardumoto Kit Hookup Guide

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Member #470260 / about 3 years ago / 1

    The sample program for controlling the Ardumoto is incorrect. Trying to use just one control line to change direction of motor doesn't always work. Two control lines are actually required by the L298. In the "spin" portion of the code, the two commands happened to be sent, and the robot will spin, but in the other segments, it is evident that forward and reverse of the motors are not operating properly. Lines In2 and In4 are also needed, and are not wired to the edge of the board, but are accessible in the center portion. For reliable control of motor A, use pin 2, PWM pin 3, and In2. For motor B use pin 4, PWM pin 11, and In4. Sent a HIGH to pin 2 and a LOW to In2, and motor A will go forward. Send a LOW to pin 2 and a HIGH to In2, and the motor will always reverse. Same for motor B, a HIGH to one control line and LOW to the other will do one motor direction, and reverse that to reverse the motor.

    • El Duderino / about 3 years ago / 1

      Hi there,

      I'm not sure what issue you are running into here regarding the motor direction in the example code. The single direction control lines should work just fine on the Ardumoto. The design uses digital inverters on IN1/IN2 & IN3/IN4 to accomplish what you are describing needs to happen (i.e. IN1 LOW and IN2 HIGH or vice versa). In testing with one of these shields on a SparkFun RedBoard and have not run into any issues with changing motor directions controlling either DIRA or DIRB pin.

      If you think this is an issue with the code we should investigate further, please file an issue on the Ardumoto GitHub Repository and we'll look into it. If you file an issue, please include as much information about your circuit and the problem you are experience as possible.


If you've found an issue with this tutorial content, please send us your feedback!