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 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 Thread thread; 00006 00007 void led2_thread() { 00008 while (true) { 00009 led2 = !led2; 00010 wait(1); 00011 } 00012 } 00013 00014 int main() { 00015 // Create a thread to execute the function led2_thread 00016 thread.start(led2_thread); 00017 // Now led2_thread is executing concurrently with main at this point 00018 00019 while (true) { 00020 led1 = !led1; 00021 wait(0.5); 00022 } 00023 }
Generated on Sun Jul 17 2022 00:45:23 by
1.7.2