![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All tasks complete
Dependencies: mbed MCP23017 mbed-rtos WattBob_TextLCD
Diff: main.cpp
- Revision:
- 12:f4052a23ddc7
- Parent:
- 11:d6d1583fc824
- Child:
- 14:25241ed5b056
--- a/main.cpp Wed Mar 27 13:41:38 2019 +0000 +++ b/main.cpp Wed Mar 27 15:14:10 2019 +0000 @@ -19,6 +19,16 @@ 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 +Thread thread_1; +Thread thread_2; +Thread thread_3; +Thread thread_4; +Thread thread_5; +Thread thread_6; +Thread thread_7; +Thread thread_8; +Thread thread_9; +Thread thread_10; Mutex simuXS; @@ -27,7 +37,8 @@ int main() { - + // 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 @@ -35,21 +46,20 @@ 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); + thread_1.start(task1readbrake); + thread_2.start(task2readaccel); + thread_3.start(task3enginestate); + thread_4.start(task4average); + thread_5.start(task5brakeLED); + thread_6.start(task6speedmonitor); + thread_7.start(task7displayvalues); + thread_8.start(task8sidelights); + thread_9.start(task9indLED); + thread_10.start(taskXserialdump); - // set up for the LCD - + while(1){