![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
3rd year group project. Electronic and Electrical Engineering. Heriot-Watt University. This is the code for the mbed for the Automatic Little Object Organiser (ALOO).
Dependencies: MCP23017 TCS3472_I2C WattBob_TextLCD mbed
Diff: commander.h
- Revision:
- 2:7a55cb10259f
- Child:
- 3:843b830ee8bd
diff -r 92a2a5ef65a8 -r 7a55cb10259f commander.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commander.h Fri Oct 30 07:51:47 2015 +0000 @@ -0,0 +1,27 @@ +#include "mbed.h" +#include "globals.h" + +#ifndef COMMANDER_INCLUDED +#define COMMANDER_INCLUDED + +enum Type { INVALID = -1, QUERY = 0, SET, REPLY }; +enum CObject { MBED = 0, COLOUR_SENSOR, SERVOS }; + +typedef struct { + char inputString[gCommandBufferSize]; + char outputString[gCommandBufferSize]; + + char commandType[1]; + char commandObject[20]; + char commandString[78]; + + Type typeEnum; + CObject objectEnum; +} Command; + + +Type listenForCommand(); +void recieveCommand(Command *cmd, Type type); +void decodeCommand(Command *cmd); + +#endif