We do not know of any libraries for our motor drivers for that platform. The basic interface for the driver board is pretty straight forward. If the PWM pin is high, the driver will send power to the motor and if it is low, the power will be disconnected. To drive the motor at less than full power, the PWM pin is toggled between high and low at a relatively high frequency (several hundred hertz to a few 10’s of kHz).
Changing the state of the DIR pin changes the direction of rotation of the attached motor when the PWM pin is high.
You can read more about the functionality of all the input and output pins on the motor driver in the “Pinout” section of the G2 motor driver’s product page.
@nathanb I have tried as you described. I have set the PWM pin to high and also tried it with the DIR PIN. I have checked with my multimeter, neither OUTA nor OUTB pin getting a high signal.
We generally do not expect header pins inserted through the board into a breadboard like that to work. You should try soldering the pins or using minigrabber style test clips to make your connections if you want them to be more temporary.
We have not eliminated the possibility of a faulty driver yet, but we test every board, so it seems more likely there is something else causing the problem.
Can you post pictures that show your soldered connections? What is the voltage of the battery you’re using for the motor driver? The motor driver has a minimum input voltage of 6.5V. When you tested OUTA and OUTB with the multimeter, were you measuring the voltage between those two pins or between each of those pins and GND?
I measure the voltage between each of those pins and GND but it works now.
The mistake was the voltage of the battery was too low.
The battery I had been using was throttled from 12v to 5v. And as you said, the motor driver needs at least 6.5v.