I'm trying to learn more about making electronics making stuff. Right now I'm just trying to get a servo to move so I can go on to bigger things.
I have a Pi B+ running Rasbian and an HS-311 servo connected to a battery pack with 4 AA's in it. I've installed pi-blaster and as far as I can tell it is running but I can't get any movement out of the servo. Here is a diagram of my wiring.
As you can see I've added an LED onto the control wire for the servo to see if anything is happening. If I run
echo "17=1" > /dev/pi-blaster the led lights up but the servo doesn't move. Running
echo "17=0.5" > /dev/pi-blasterdims the led and
echo "17=0" > /dev/pi-blaster will turn it off but nothing I do will get the servo to turn.
I'm not sure at this point if I've wired something wrong or if I'm doing something wrong in code.
Update: Thanks to @joan I had forgot to ground the control circuit with the Pi. I did so and replaced the batteries as they were to weak to control the servo. The servo will now go to a few positions;
echo "17=.04" > /dev/pi-blastergives position of 0
echo "17=.24" > /dev/pi-blastergives position of 190
Values >0.04 <0.24 move the servo in equal increments.
Values <0.04 >0 and >0.24 <1 move the servo to 0 and 190 respectively
A value of 1 or 0 turns the servo off without moving it.
I'm not sure if missing something as I had thought that 0 would move the servo full stop one way and 1 would move it full stop the other way. Is there some defaults I should be setting?