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 void print_char(char c = '*') 00004 { 00005 printf("%c", c); 00006 fflush(stdout); 00007 } 00008 00009 Thread thread; 00010 00011 DigitalOut led1(LED1); 00012 00013 void print_thread() 00014 { 00015 while (true) { 00016 wait(1); 00017 print_char(); 00018 } 00019 } 00020 00021 int main() 00022 { 00023 printf("\n\n*** RTOS basic example ***\n"); 00024 00025 thread.start(print_thread); 00026 00027 while (true) { 00028 led1 = !led1; 00029 wait(0.5); 00030 } 00031 }
Generated on Tue Jul 12 2022 14:24:13 by
