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.
Fork of app-board-Joystick by
Revision 1:102ef7d39407, committed 2013-04-23
- Comitter:
- avnisha
- Date:
- Tue Apr 23 05:49:39 2013 +0000
- Parent:
- 0:0e4db18afd77
- Commit message:
- Bootcamp joystick
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp	Mon Oct 15 13:37:36 2012 +0000
+++ b/main.cpp	Tue Apr 23 05:49:39 2013 +0000
@@ -1,7 +1,30 @@
+
+#include "mbed.h"
+
+InterruptIn fire(p14);
+DigitalOut  led(LED1);
+DigitalOut  flash(LED4);
+
+void ISR1() {
+    led = !led;
+}
+
+int main()
+{
+    fire.rise(&ISR1);
+    fire.fall(&ISR1);
+    
+    while (1) {
+        flash = !flash;
+        wait(0.25);
+    }   
+}
+
+#ifdef OLD
 #include "mbed.h"
 
 BusIn joy(p15,p12,p13,p16);
-DigitalIn fire(p14);
+InterruptIn fire(p14);
 
 BusOut leds(LED1,LED2,LED3,LED4);
 
@@ -16,3 +39,4 @@
         wait(0.1);
     }
 }
+#endif
    