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 Timeout flipper; 00004 DigitalOut led1(LED1); 00005 DigitalOut led2(LED2); 00006 00007 void flip() { 00008 led2 = !led2; 00009 } 00010 00011 int main() { 00012 led2 = 1; 00013 flipper.attach(&flip, 2.0); // setup flipper to call flip after 2 seconds 00014 00015 // spin in a main loop. flipper will interrupt it to call flip 00016 while(1) { 00017 led1 = !led1; 00018 wait(0.2); 00019 } 00020 }
Generated on Tue Jul 12 2022 11:04:54 by
