I've got a Dagu 4 channel motor controller that I'm using with a Rover 5 chassis all being controlled by a BeagleBone Back running Debian Wheezy from the SD card.
The controller receives 5v VCC from the BeagleBone and VBat is connected to the 6xAA that came with the chassis. Only one motor is connected with the PWM pin going to P9_14 (GPIO_40) and the DIR pin on P9_12 (GPIO_60).
When I do this sort of thing:
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
..then the motor turns at full speed as expected. When I then do this:
echo 0 > /sys/class/gpio/gpio60/value
Instead of reversing direction, the motor stops dead.
The weird thing is when I hook the whole thing up to an Arduino the motors run in both directions ok so the hardware is not faulty.
Does anyone have any ideas what I could be doing wrong on the BeagleBone?
Thanks in advance.