![](/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-11-11
- Revision:
- 3:843b830ee8bd
- Parent:
- 2:7a55cb10259f
- Child:
- 6:98fe30430194
File content as of revision 3:843b830ee8bd:
#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, BEAM_SENSOR }; typedef struct { char inputString[80]; char outputString[80]; char commandType[1]; char commandObject[20]; char commandString[59]; Type typeEnum; CObject objectEnum; } Command; Type listenForCommand(); void recieveCommand(Command *cmd, Type type); void decodeCommand(Command *cmd); #endif