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:
9:954ac88dda04
Parent:
8:ef3558374977
--- a/main.cpp	Fri Mar 27 22:07:54 2015 +0000
+++ b/main.cpp	Thu Jan 19 10:37:24 2017 -0600
@@ -15,7 +15,7 @@
  */
 #include "mbed.h"
 
-DigitalIn  mypin(BUTTON1); // change this to the button on your board
+DigitalIn  mypin(SW2); // change this to the button on your board
 DigitalOut myled(LED1);
 
 int main()