ใช้สื่อสารกันระหว่าง Brain และ Motion
Dependencies: Fork_Boss_Communication_Robot
Dependents: Program_BEAR_Protocol SwitchMode MPU9250AHRS-PGear_Stabilizer SwitchMode ... more
BEAR_Protocol.h
- Committer:
- b0ssiz
- Date:
- 2015-12-23
- Revision:
- 0:fc963e08d580
- Child:
- 4:9fbe67ca2f1b
File content as of revision 0:fc963e08d580:
#include "mbed.h" #include "iSerial.h" #include "Command.h" #include "communication.h" #define SERIAL_DEBUG #define RS485_DELAY 90 #define RS485_DIRC PA_14 class Bear_Communicate { private: COMMUNICATION *com; public: Bear_Communicate(PinName,PinName,int); // Set Command uint8_t SetID(uint8_t,uint8_t); uint8_t SetMotorPos(uint8_t,float,float); uint8_t SetKp(uint8_t,float); uint8_t SetKi(uint8_t,float); uint8_t SetKd(uint8_t,float); //EEPROM uint8_t SetMargin(uint8_t,float); uint8_t SetHeight(uint8_t,float); uint8_t SetWheelPos(uint8_t,float); uint8_t SetMagData(uint8_t,float,float,float,float,float,float); uint8_t SetOffset(uint8_t,float,float); uint8_t SetBodyLength(uint8_t,float); uint8_t SetAngleRange(uint8_t,float,float); // Get Command uint8_t GetMotorPos(uint8_t,float*,float*); uint8_t GetKpKiKd(uint8_t,float*,float*,float*); //EEPROM uint8_t GetMargin(uint8_t,float*); uint8_t GetHeight(uint8_t,float*); uint8_t GetWheelPos(uint8_t,float*); uint8_t GetMagData(uint8_t,float*,float*,float*,float*,float*,float*); uint8_t GetOffset(uint8_t,float*,float*); uint8_t GetBodyLength(uint8_t,float*); uint8_t GetAngleRange(uint8_t,float*,float*); };