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 myled(LED1); 00004 PwmOut led1(LED1), led2(LED2),led3(LED3),led4(LED4); 00005 00006 00007 int main() { 00008 int i=0; 00009 while(1) 00010 { 00011 if( i==0) 00012 { 00013 led1=led1 + 0.01; 00014 led3=led3 + 0.01; 00015 led2=led2 +0.01; 00016 led4 =led4+0.01; 00017 wait(0.005); 00018 if(led1==1) 00019 { 00020 i=1; 00021 } 00022 } 00023 00024 if(i==1) 00025 { 00026 led1=led1 - 0.01; 00027 led2=led2 - 0.01; 00028 led3= led3 - 0.01; 00029 led4 =led4 - 0.01; 00030 wait(0.005); 00031 if(led1==0) 00032 { 00033 i=0; 00034 } 00035 } 00036 } 00037 00038 } 00039
Generated on Fri Jul 29 2022 07:54:37 by
