Background: Bought a BBB and experimenting a bit, managed to control LEDS and relays. Problem: can't get the expected behaviour from the servo, it keeps spinning CCW Cause: don't know, whey I'm asking here :)
Facts: BBB with Angstrom External 5V DC to both BBB and servo Servo: Tower Pro sg90 (very common servo) AND it's working as I tried it in my RC car.
Procedure: following som tutorials on the web (and used Adafruit_BBIO library), I'm trying to make my servo work, e.g. turn 0, 90, 180 etc so here's what I'm doing:
echo am33xx_pwm > /sys/devices/bone_capemgr.8/slots
echo bone_pwm_P8_13 > /sys/devices/bone_capemgr.8/slots
echo 20000000 > /sys/devices/ocp.2/pwm_test_P8_13.15/period (this is 50Hz,also tried 60Hz)
echo 10000000 > /sys/devices/ocp.2/pwm_test_P8_13.15/duty
echo 1 > /sys/devices/ocp.2/pwm_test_P8_13.15/run
Doing the above the servo spins CCW with no stop. I can read 50Hz (60Hz) and 1.66V and even tried to use level shifter so I get ~ 2.5V I don't know what I'm doing wronge (if I am) or am I missing something?