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
Fork of frdm_ticker by
main.cpp
00001 #include "mbed.h" 00002 00003 Ticker tick; 00004 DigitalOut led1(LED_RED); 00005 DigitalOut led2(LED_GREEN); 00006 00007 void flip() 00008 { 00009 led2 = !led2; 00010 } 00011 00012 int main() 00013 { 00014 tick.attach(&flip, 0.7); // setup ticker to call flip every 0.7 seconds 00015 00016 while (true) { 00017 led1 = !led1; 00018 wait (0.3); // flip led1 every 0.3 seconds 00019 } 00020 }
Generated on Thu Jul 14 2022 12:46:58 by
1.7.2
