Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Communication_Robot
Fork of BEAR_Protocol by
Diff: BEAR_Protocol.h
- Revision:
- 0:fc963e08d580
- Child:
- 4:9fbe67ca2f1b
diff -r 000000000000 -r fc963e08d580 BEAR_Protocol.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/BEAR_Protocol.h Wed Dec 23 13:05:53 2015 +0000
@@ -0,0 +1,46 @@
+#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*);
+};
\ No newline at end of file
