![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All tasks complete
Dependencies: mbed MCP23017 mbed-rtos WattBob_TextLCD
Diff: main.cpp
- Revision:
- 4:27340b291c09
- Parent:
- 3:f88d667629e6
- Child:
- 8:3f3f2c2e2046
diff -r f88d667629e6 -r 27340b291c09 main.cpp --- a/main.cpp Mon Mar 25 21:13:24 2019 +0000 +++ b/main.cpp Tue Mar 26 14:49:10 2019 +0000 @@ -10,22 +10,29 @@ Version 0.2 Aingkaran Suppiah */ -DigitalOut myled(LED1); +SDATA speed = SDATA(); +CARINFO info = CARINFO(); +SIMU_DATA sim = SIMU_DATA(); + + + +MCP23017 *par_port = NULL; // pointer to 16-bit parallel I/O object +WattBob_TextLCD *display = NULL; // pointer to 2*16 chacater LCD object + + + +Mutex simuXS; +Mutex speedXS; +Mutex carstateXS; int main() { - // initialise 16-bit I/O chip - par_port = new MCP23017(p15, p16, 0x40); - // set up for the LCD - lcd = new WattBob_TextLCD(par_port); // initialise 2*26 char display - lcd->cls(); + + par_port = new MCP23017(p9, p10, 0x40); // initialise 16-bit I/O chip + display = new WattBob_TextLCD(par_port); // initialise 2*26 char display par_port->write_bit(1,BL_BIT); // turn LCD backlight ON - lcd->printf("%i , %i", speed.brakevalue, speed.accelvalue); - - -