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: globals.cpp
- Revision:
- 8:e1da2ae62885
- Parent:
- 7:b6e31bfdb2af
- Child:
- 9:dc8f155b71c8
diff -r b6e31bfdb2af -r e1da2ae62885 globals.cpp --- a/globals.cpp Mon Nov 16 18:46:31 2015 +0000 +++ b/globals.cpp Mon Nov 16 22:20:11 2015 +0000 @@ -5,3 +5,52 @@ int gStopBits = 1; Block _HazBlock = Block(kDefaultHazBlock); + +bool connectedToPC = false; + +void connectToPC(CommandTypeRaw typeRaw){ + pc.printf("pc told to connect\n"); + connectedToPC = true; +} + +void disconnectToPC(CommandTypeRaw typeRaw){ + pc.printf("pc told to disconnect\n"); + connectedToPC = false; +} + +void hazBlock(CommandTypeRaw typeRaw){ + if (typeRaw == Set) { + pc.printf("setting new haz block.\n"); + }else if (typeRaw == Query){ + pc.printf("priting current haz block settings.\n"); + } +} + +void getCurrentBlock(CommandTypeRaw typeRaw){ + pc.printf("getting current block readings\n"); +} + +void setIntegrationTime(int integrationTime){ + pc.printf("setting i-time to %i.\n", integrationTime); +} + +void previewOnPC(bool on){ + pc.printf("setting preview on pc to %i.\n", on); +} + +void testServos(){ + pc.printf("testing servos.\n"); +} + +void resetServos(){ + pc.printf("resetting servos.\n"); +} + +void getPortInfo(){ + pc.printf("getting port info.\n"); +} + +void setPortBaudRate(int baudRate){ + pc.printf("setting port baudrate to: %i\n", baudRate); +} +