DigitalIn Hello World

Fork of DigitalIn_HelloWorld_Mbed by Mbed

Use

The DigitalIn API is used to read a digital pin. The value will be either 0 or 1. Buttons and switches are some of the more common digital inputs.

API

API reference.

Import librarymbed

No documentation found.
Revision:
8:ef3558374977
Parent:
7:64e67ec4441e
Child:
9:954ac88dda04
--- a/main.cpp	Fri Mar 27 21:24:54 2015 +0000
+++ b/main.cpp	Fri Mar 27 22:07:54 2015 +0000
@@ -20,13 +20,13 @@
 
 int main()
 {
-    // check mypin object is initialized and connected to a pin 
+    // check mypin object is initialized and connected to a pin
     if(mypin.is_connected()) {
         printf("mypin is connected and initialized! \n\r");
     }
     
     // Optional: set mode as PullUp/PullDown/PullNone/OpenDrain
-    mypin.mode(PullNone); /
+    mypin.mode(PullNone); 
     
     // press the button and see the console / led change
     while(1) {