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 LEDandButton by
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalOut led1(D4); 00004 DigitalOut led2(D5); 00005 DigitalOut led3(D6); 00006 DigitalIn button(D7); 00007 void LED_Blinkly(DigitalOut led1,DigitalOut led2,DigitalOut led3); 00008 // main() runs in its own thread in the OS 00009 int main() 00010 { 00011 while(1) 00012 { 00013 00014 if(button == false) 00015 { 00016 led1 =! led1; 00017 wait(0.5); 00018 led2 =! led2; 00019 wait(0.5); 00020 led3 =! led3; 00021 wait(0.5); 00022 } 00023 else 00024 { 00025 led1 = false; 00026 led2 = false; 00027 led3 = false; 00028 } 00029 } 00030 }
Generated on Wed Jul 13 2022 22:36:35 by
 1.7.2
 1.7.2 
    