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 int main(){ 00004 DigitalOut *led[4]; 00005 led[0] = new DigitalOut(LED1); 00006 led[1] = new DigitalOut(LED2); 00007 led[2] = new DigitalOut(LED3); 00008 led[3] = new DigitalOut(LED4); 00009 int i; 00010 *led[0] = 0; 00011 *led[1] = 0; 00012 *led[2] = 0; 00013 *led[3] = 0; 00014 00015 while(1){ 00016 for(i=0;i<4;i++){ 00017 wait(0.5); 00018 *led[i] = 1; 00019 } 00020 for(i=4;i>0;i--){ 00021 wait(0.5); 00022 *led[i-1] = 0; 00023 } 00024 } 00025 }
Generated on Thu Aug 4 2022 23:15:31 by
1.7.2