CA 2.5 Lab1 modified
Dependencies: mbed mbed-rtos C12832_lcd LCD_fonts
Diff: main.cpp
- Revision:
- 4:32dafaf166e5
- Parent:
- 3:3ec443c0842a
- Child:
- 5:b416b7c917ff
--- a/main.cpp Wed Dec 05 08:06:20 2012 +0000 +++ b/main.cpp Sun Jul 26 21:03:38 2020 +0000 @@ -114,6 +114,22 @@ LCD.printf("contrast : %d",j); lcd_mutex.unlock(); Thread::wait(500); // wait 0.5s +BusIn joy(p15,p12,p13,p16); +DigitalIn fire(p14); + +BusOut leds(LED1,LED2,LED3,LED4); + +int main();{ + while(1) { + if (fire) { + leds=0xf; + } else { + leds=joy; + } + wait(0.1); + } +} + } }