![](/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
commander.h
- Committer:
- dreamselec
- Date:
- 2015-10-30
- Revision:
- 2:7a55cb10259f
- Child:
- 3:843b830ee8bd
File content as of revision 2:7a55cb10259f:
#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