Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
main.cpp
00001 #include "mbed.h" 00002 /* 00003 DigitalIn mybutton(USER_BUTTON); 00004 DigitalOut myled(LED1); 00005 */ 00006 DigitalIn mybutton(PC_13); 00007 DigitalOut myled(PA_5); 00008 00009 00010 int main() { 00011 while(1) { 00012 if (mybutton.read() == 0) { // Button is pressed 00013 myled = !myled; // Toggle the LED state 00014 wait(0.2); // 200 ms 00015 } 00016 } 00017 } 00018
Generated on Fri Jul 22 2022 04:54:19 by
1.7.2