External Interrupt example for WIZwiki-W7500 Academy

Dependencies:   mbed

Fork of GPIOIn_INT_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Revision:
4:296a62c9cb15
Parent:
3:f3fffb66c845
Child:
6:41c9ebdce05b
--- a/main.cpp	Thu Jul 09 01:38:41 2015 +0000
+++ b/main.cpp	Thu Jul 09 04:20:58 2015 +0000
@@ -1,9 +1,10 @@
 /* GPIO Input Interrupt Example Program */
-
+ 
 #include "mbed.h"
  
-InterruptIn mysw(D4);
-DigitalOut myled2(LED3);
+InterruptIn mysw(D10);
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
  
 void exin(){
     myled2 = !myled2;
@@ -12,7 +13,9 @@
 int main() {
     
     mysw.rise(&exin);    // attach the address of the exin function to the rising edge
-
-}
-
-
+    while(1) {           // wait around, interrupts will interrupt this!
+        myled1 = !myled1;
+        wait(1.0);
+    }
+    
+}
\ No newline at end of file