Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed mbed-rtos C12832_lcd LCD_fonts
Revision 4:cf2a45e627f3, committed 2020-08-16
- Comitter:
- rudolf5020
- Date:
- Sun Aug 16 19:46:34 2020 +0000
- Parent:
- 3:3ec443c0842a
- Commit message:
- Q5
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Dec 05 08:06:20 2012 +0000
+++ b/main.cpp Sun Aug 16 19:46:34 2020 +0000
@@ -115,5 +115,24 @@
lcd_mutex.unlock();
Thread::wait(500); // wait 0.5s
}
+// Thread 5
+// switch LED with joystick.
+BusIn joy(p15,p12,p13,p16);
+DigitalIn fire(p14);
+
+BusOut leds(LED1,LED2,LED3,LED4);
+Thread thread5
+void thread5(void const *args);
+
+int main(Thread)
+{
+ while(1) {
+ if (fire) {
+ leds=0xf;
+ } else {
+ leds=joy;
+ }
+ wait(0.1);
+ }
}