![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All tasks complete
Dependencies: mbed MCP23017 mbed-rtos WattBob_TextLCD
Diff: main.cpp
- Revision:
- 8:3f3f2c2e2046
- Parent:
- 4:27340b291c09
- Child:
- 9:2fd97246b8f0
--- a/main.cpp Tue Mar 26 16:48:30 2019 +0000 +++ b/main.cpp Tue Mar 26 21:42:14 2019 +0000 @@ -16,8 +16,8 @@ -MCP23017 *par_port = NULL; // pointer to 16-bit parallel I/O object -WattBob_TextLCD *display = NULL; // pointer to 2*16 chacater LCD object +MCP23017 *par_port; // pointer to 16-bit parallel I/O object **was = NULL +WattBob_TextLCD *display; // pointer to 2*16 chacater LCD object **was = NULL @@ -25,15 +25,34 @@ Mutex speedXS; Mutex carstateXS; -int main() { - +int main() { + + + 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 + + + Thread thread_1(task1readbrake); + Thread thread_2(task2readaccel); + Thread thread_3(task3enginestate); + Thread thread_4(task4average); + Thread thread_5(task5brakeLED); + Thread thread_6(task6speedmonitor); + Thread thread_7(task7displayvalues); + Thread thread_8(task8sidelights); + //Thread thread_9(task9indLED(); + //Thread thread_10(taskXserialdump); + + // set up for the LCD - 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 + - - +while(1){ + + } } \ No newline at end of file