ROBOT . HEAD to TOE
Product User’s Manual –
Shield-Servo
Activate Servo Channel Command
The initial status for servo motor is deactivated. Host need to sends 2 byte command to
shield-Servo to On/Off selected channels or all channels before running the servo motor. The
command is being send in packet format. Each packet consists of 2 bytes. Servo motor channel is
0-8 (decimal value). A value of ‘0’ will activate/deactivate all servo motor from channel 1 to 8.
i. 1st byte: Mode (3 MSB) + servo motor channel (5 LSB)
0b
1
1
0
X
X
X
X
X
.
110
Mode to activate servo channel
00000-01000
Servo motor channel, channel 1 to 8, represented by the decimal value
ii. 2nd byte: On/Off, only the LSB is valid.
0b
0
0
0
0
0
0
0
X
1
Activate servo motor
0
Deactivate servo motor
Position and speed command
a. The command is being send in packet format. Host needs to send a packet of data. Each
packet consists of 4 bytes. The data need to be sent 1 byte by 1 byte.
i.
1
st
byte: Mode + Servo motor channel
ii.
2
nd
byte: Position (Higher 7 bit)
iii.
3
rd
byte: Position (Lower 6 bit)
iv.
4
th
byte: Speed (0-100)
b. Shield-servo translate four bye into three parameter.
Byte
Binary
Hexadecimal
Decimal
1st Byte
0b111XXXXX
0xE1 to 0xE8
224 to 232
2nd Byte
0b0XXXXXXX
0x00 to 0x7F
0 to 127
3rd Byte
0b00XXXXXX
0x00 to 0x3F
0 to 63
4th Byte
0b0XXXXXXX
0x00 to 0x64
0 to 100
.
Created by Cytron Technologies Sdn. Bhd. – All Rights Reserved
21