Digital Input simple example for WIZwiki-W7500 academy

Dependencies:   mbed

Fork of DigitalIn_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Revision:
17:2678f7976a04
Parent:
16:15c653e11eae
Child:
18:4d702f3a0d0e
diff -r 15c653e11eae -r 2678f7976a04 main.cpp
--- a/main.cpp	Wed Jan 06 06:33:11 2016 +0000
+++ b/main.cpp	Wed Feb 03 07:16:09 2016 +0000
@@ -3,7 +3,8 @@
 #include "mbed.h"
 
 DigitalOut myled_R(LED_RED);    // LED_RED on WIZwiki-W7500
-DigitalIn  mysw(D10);            // push switch 
+
+DigitalIn  mysw(D10);           // push switch 
 
 int main()
 {
@@ -16,32 +17,15 @@
         printf("Digital Input value is %d \n\r", sw_val);    // output Digital Input value
         
         if(sw_val == 1)     // switch pushed, Red LED ON
-             myled_R = 0;       
-        else myled_R = 1;   // the others, Red LED OFF
+        {     
+            myled_R = 0;
+        }
+        else
+        {
+            myled_R = 1;   // the others, Red LED OFF
+        }
         
         wait(0.2);
     }
     
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+}
\ No newline at end of file