I bought one of these boards: https://www.sparkfun.com/products/11593 and am having problems running the motors in reverse.
It’s attached to a BeagleBone Black running Debian Wheezy from the SD card. The VCC has 5v and GND from the BeagleBone and Vbat attached to the 6xAA battery pack that came with the Rover 5. The motor has it’s PWM and DIR pins attached to P9_14 (GPIO_40) and P9_12 (GPIO_60) respectively (e.g. I haven’t connected up CUR or GND on the controller pins or any of the encoders).
When I do this:
echo 1 > /sys/class/gpio/gpio60/value
echo 0 > /sys/devices/ocp.3/pwm_test_P9_14.18/polarity
echo 500000 > /sys/devices/ocp.3/pwm_test_P9_14.18/period
echo 500000 > /sys/devices/ocp.3/pwm_test_P9_14.18/duty
The motor starts to spin at full speed, but if I do this:
echo 0 > /sys/class/gpio/gpio60/value
instead of starting to spin in the opposite direction it just stops dead.
I’ve tried all the motors, none of which make a difference and I’ve always connected the VCC pins before Vbat.
Any ideas as to what I am doing wrong?
Thanks in advance.