Xiaofei Qiu / CommandPool
Committer:
Xiaofei
Date:
Sat Nov 28 00:57:32 2015 +0000
Revision:
2:689cb6f63695
Parent:
1:2af5ac5be09c
Child:
3:b83fb41e2726
c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Xiaofei 0:1e6560189dfa 1 #ifndef PROTOCOL_H
Xiaofei 0:1e6560189dfa 2 #define PROTOCOL_H
Xiaofei 0:1e6560189dfa 3
Xiaofei 1:2af5ac5be09c 4 // Commands
Xiaofei 0:1e6560189dfa 5 const char LED = 0x00;
Xiaofei 0:1e6560189dfa 6 const char TURN_LEFT = 0x01;
Xiaofei 0:1e6560189dfa 7 const char TURN_RIGHT = 0x02;
Xiaofei 0:1e6560189dfa 8 const char MOVE_FORWARD = 0x03;
Xiaofei 0:1e6560189dfa 9 const char MOVE_BACKWARD = 0x04;
Xiaofei 0:1e6560189dfa 10 const char STOP = 0x05;
Xiaofei 0:1e6560189dfa 11
Xiaofei 1:2af5ac5be09c 12 // Speeds for left wheel
Xiaofei 1:2af5ac5be09c 13 const char LEFT_SPEED1 = 0x10;
Xiaofei 1:2af5ac5be09c 14 const char LEFT_SPEED2 = 0x20;
Xiaofei 1:2af5ac5be09c 15 const char LEFT_SPEED3 = 0x30;
Xiaofei 1:2af5ac5be09c 16
Xiaofei 1:2af5ac5be09c 17 // Speeds for right wheel
Xiaofei 1:2af5ac5be09c 18 const char RIGHT_SPEED1 = 0x40;
Xiaofei 1:2af5ac5be09c 19 const char RIGHT_SPEED2 = 0x80;
Xiaofei 1:2af5ac5be09c 20 const char RIGHT_SPEED3 = 0x12;
Xiaofei 1:2af5ac5be09c 21
Xiaofei 2:689cb6f63695 22 const char NEGATIVE = 0x08;
Xiaofei 2:689cb6f63695 23
Xiaofei 1:2af5ac5be09c 24 #endif