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.
Fork of mbed-os-example-mbed5-blinky by
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut led1(LED1); 00004 DigitalOut led2(LED2); 00005 DigitalOut led3(LED3); 00006 DigitalOut led4(LED4); 00007 00008 // main() runs in its own thread in the OS 00009 // (note the calls to Thread::wait below for delays) 00010 int main() { 00011 char a=1,b; 00012 while (true) { 00013 led1 = !(a^1); 00014 led2 = !(a^2); 00015 led3 = !(a^4); 00016 led4 = !(a^8); 00017 if (led1) b=1; 00018 if (led4) b=0; 00019 if (b) a=a<<1; 00020 else a=a>>1; 00021 Thread::wait(500); 00022 } 00023 } 00024
Generated on Sat Jul 23 2022 16:33:09 by
