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 #define WAIT_TIME_MS 1000 00004 DigitalOut led1(LED1); 00005 DigitalOut led2(LED2); 00006 DigitalOut led3(LED3); 00007 00008 int main() 00009 { 00010 int i = 0; 00011 printf("Bare metal code on Mbed OS %d.%d.%d.\n", MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION); 00012 00013 for( i=0; i<20; i++) { 00014 led1 = led2 = led3 = 1; 00015 thread_sleep_for(100); 00016 led1 = led2 = led3 = 0; 00017 thread_sleep_for(100); 00018 } 00019 00020 i = 0; 00021 00022 while (true) 00023 { 00024 led1 = !led1; 00025 led2 = !led1; 00026 led3 = !led2; 00027 i++; 00028 printf("Time: %d\n", i); 00029 thread_sleep_for(WAIT_TIME_MS); 00030 } 00031 }
Generated on Sat Jul 30 2022 22:18:02 by
