![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
All tasks complete
Dependencies: mbed MCP23017 mbed-rtos WattBob_TextLCD
Diff: main.cpp
- Revision:
- 3:f88d667629e6
- Parent:
- 1:c4f62ef9b5b7
- Child:
- 4:27340b291c09
diff -r 9d6d07c9cc9c -r f88d667629e6 main.cpp --- a/main.cpp Wed Mar 20 19:51:42 2019 +0000 +++ b/main.cpp Mon Mar 25 21:13:24 2019 +0000 @@ -7,12 +7,25 @@ - Version 0.1 Aingkaran Suppiah + Version 0.2 Aingkaran Suppiah */ DigitalOut myled(LED1); -int main() { +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->write_bit(1,BL_BIT); // turn LCD backlight ON + lcd->printf("%i , %i", speed.brakevalue, speed.accelvalue); + + +