Wireless S4A 架構
RaspberryPi
Motoduino
(Arduino)
• Linux OS
• S4A protocol implemented
by Python socket
• WiFi with AP mode
• S4A Firmware
• Motor driver (L293D)
• WiFi with STA mode (ESP8266)
WiFi Connection
S4A protocol
34
解析封包格式
1 0
High ByteLow Byte
Channel
[3:0]
Value
[6:0]
HL-identify (2 bit) +
Channel (4 bits) +
Value (10 bits)
Value
[9:7]
47
48.
Motoduino Channel Def: Pi
Channel Value
0 Analog Input (0~1023)
1 Analog Input (0~1023)
2 Analog Input (0~1023)
3 Analog Input (0~1023)
4 Analog Input (0~1023)
5 Analog Input (0~1023)
6 Digital : 0/1
7 Digital : 0/1
48
49.
Motoduino Channel Def: Pi
Channel Value
4 Continuous Rotation Motor
5 PWM: 0 ~ 255
6 PWM: 0 ~ 255
7 Digital : 0/1
8 Digital : 0/1
9 PWM: 0 ~ 255
10 Digital : 0/1
11 Digital : 0/1
12 Servo Motor
13 Digital : 0/1 49