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 DigitalOut myled2(LED2); 00005 DigitalOut myled3(LED3); 00006 DigitalOut myled4(LED4); 00007 00008 int main() { 00009 while(1) { 00010 myled = 1; // led on 00011 wait(0.2); /* 0.2Sec Wait*/ 00012 myled2 = 1; // led on 00013 wait(0.2); /* 0.2Sec Wait*/ 00014 myled3 = 1; // led on 00015 wait(0.2); /* 0.2Sec Wait*/ 00016 myled4 = 1; // led on 00017 wait(0.2); /* 0.2Sec Wait*/ 00018 myled = 0; // led off 00019 wait(0.2); /* 0.2Sec Wait*/ 00020 myled2 = 0; // led off 00021 wait(0.2); /* 0.2Sec Wait*/ 00022 myled3 = 0; // led off 00023 wait(0.2); /* 0.2Sec Wait*/ 00024 myled4 = 0; // led off 00025 wait(0.4); 00026 00027 myled4 = 1; // led on 00028 wait(0.2); /* 0.2Sec Wait*/ 00029 myled3 = 1; // led on 00030 wait(0.2); /* 0.2Sec Wait*/ 00031 myled2 = 1; // led on 00032 wait(0.2); /* 0.2Sec Wait*/ 00033 myled = 1; // led on 00034 wait(0.2); /* 0.2Sec Wait*/ 00035 myled4 = 0; // led off 00036 wait(0.2); /* 0.2Sec Wait*/ 00037 myled3 = 0; // led off 00038 wait(0.2); /* 0.2Sec Wait*/ 00039 myled2 = 0; // led off 00040 wait(0.2); /* 0.2Sec Wait*/ 00041 myled = 0; // led off 00042 wait(0.4); 00043 } 00044 }
Generated on Fri Sep 16 2022 16:25:28 by
1.7.2