Rodrigo Lino
/
Nucleo_read_button
sadasd
Fork of Nucleo_read_button by
main.cpp
- Committer:
- bcostm
- Date:
- 2014-02-21
- Revision:
- 0:c9d8fcdda4d0
- Child:
- 1:52e576abcb8a
File content as of revision 0:c9d8fcdda4d0:
#include "mbed.h" DigitalIn mybutton(USER_BUTTON); DigitalOut myled(LED1); int main() { while(1) { if (mybutton == 0) { // Button is pressed myled = !myled; // Toggle the LED state wait(0.2); // 200 ms } } }