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 Ticker flipper; 00004 DigitalOut led1(LED1); 00005 bool c=false; 00006 void flip() { 00007 while (!c) { 00008 led1 = !led1; 00009 } 00010 led1=1; 00011 } 00012 00013 int main() { 00014 00015 flipper.attach(&flip, 2.0); // the address of the function to be attached (flip) and the interval (2 seconds) 00016 // spin in a main loop. flipper will interrupt it to call flip 00017 while(1) { 00018 unsigned long n=100000000; 00019 float x=0; 00020 while(x*x <n) 00021 x = x + 0.01 ; 00022 c=true; 00023 } 00024 }
Generated on Mon Jul 18 2022 06:05:54 by
1.7.2