Arduino - GlenSearle/tentacle GitHub Wiki

BEWARE

If the joint swings at speed to it's maximum reach it's momentum can break the servo's tiny plastic gears. 5º degrees is sufficient for the join to slowdown, so it's recommended to only use 5º to 175ª unless you implement measures to mitigate destructive momentum at 0º & 180º


The Arduino program uses a human readable protocol. Eight bit ASCII is sent over the serial port at 115200. The servo control signals come from the digital pins. The defaults are: hip on pin 3, knee on pin 4, ankle on pin 5 & misc servo on pin 6.

To tell a motor to more send:

G0 90

Where the number after the space is a servo number. 0,1,2 = hip, knee, ankle. The number after the space is the angle to move to. The Arduino then replies with the current and future angle when the motor starts moving.

To read analog data use.

M0

Where 0 is the number of the physical analog pin you're reading from. The servos are analog sensors, their angle can be deduced from their analog reading. In the Arduino UNO, analog values have been found to float about, to mitigate against this connect one analog pin to ground and read from this before reading from a real sensor.