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.
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalIn mybutton(USER_BUTTON); // user switch available in ST32 nucleo boards 00004 DigitalIn sw1(PC_13); // refer UM1724 ST nucleo User manual for pin details 00005 DigitalOut myled(LED1); 00006 00007 int main() { 00008 while(1) { 00009 if (sw1 == 0) { // or you can use mybutton 00010 myled = !myled; // Toggle the LED state 00011 wait(0.2); // 200 ms 00012 } 00013 } 00014 } 00015
Generated on Sun Jul 17 2022 01:32:41 by
1.7.2