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
globals.cpp@3:843b830ee8bd, 2015-11-11 (annotated)
- Committer:
- dreamselec
- Date:
- Wed Nov 11 03:45:30 2015 +0000
- Revision:
- 3:843b830ee8bd
- Parent:
- 2:7a55cb10259f
- Child:
- 4:4eebb4de22a7
The MBED program is supposed to work both when connected to PC, and on it's own. So making use of Serial (UART) interrupts, to listen for incoming commands when PC is connected. Currently only mbed control works, no commands are sent to PC, or FPGA
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dreamselec | 2:7a55cb10259f | 1 | #include "globals.h" |
dreamselec | 2:7a55cb10259f | 2 | #include "mbed.h" |
dreamselec | 2:7a55cb10259f | 3 | |
dreamselec | 2:7a55cb10259f | 4 | int gBaudRate = 19200; |
dreamselec | 2:7a55cb10259f | 5 | //SerialBase gParity = SerialBase::None; |
dreamselec | 2:7a55cb10259f | 6 | int gStopBits = 1; |
dreamselec | 3:843b830ee8bd | 7 | extern const int gCommandBufferSize = 80; |
dreamselec | 3:843b830ee8bd | 8 | extern const int gSmallBufferSize = 5; |
dreamselec | 3:843b830ee8bd | 9 | |
dreamselec | 3:843b830ee8bd | 10 | Block getDefaultHazBlock(){ |
dreamselec | 3:843b830ee8bd | 11 | Block block; |
dreamselec | 3:843b830ee8bd | 12 | block.blockSizeEnum = SMALL; |
dreamselec | 3:843b830ee8bd | 13 | return block; |
dreamselec | 3:843b830ee8bd | 14 | } |
dreamselec | 3:843b830ee8bd | 15 | |
dreamselec | 3:843b830ee8bd | 16 | |
dreamselec | 2:7a55cb10259f | 17 | |
dreamselec | 2:7a55cb10259f | 18 | char gCommandTerminator = ';'; |