Digital Input simple example for WIZwiki-W7500 academy

Dependencies:   mbed

Fork of DigitalIn_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Revision:
7:64e67ec4441e
Parent:
6:315942f167d7
Child:
8:ef3558374977
--- a/main.cpp	Fri Mar 27 21:05:43 2015 +0000
+++ b/main.cpp	Fri Mar 27 21:24:54 2015 +0000
@@ -20,14 +20,13 @@
 
 int main()
 {
-    // check mypin object is initialized and connected to a pin
-    int check = mypin.is_connected();  
-    if(check) {
+    // check mypin object is initialized and connected to a pin 
+    if(mypin.is_connected()) {
         printf("mypin is connected and initialized! \n\r");
     }
     
-    // Set resistance on line
-    mypin.mode(PullNone); // valid modes are PullUp, PullDown, PullNone, OpenDrain
+    // Optional: set mode as PullUp/PullDown/PullNone/OpenDrain
+    mypin.mode(PullNone); /
     
     // press the button and see the console / led change
     while(1) {