![](/media/cache/group/mbed-logo-square-512_3.png.50x50_q85.png)
DigitalIn Hello World
Fork of DigitalIn_HelloWorld_Mbed by
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
Diff: main.cpp
- Revision:
- 9:954ac88dda04
- Parent:
- 8:ef3558374977
diff -r ef3558374977 -r 954ac88dda04 main.cpp --- 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()