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
- Committer:
- edisonthk
- Date:
- 2014-05-13
- Revision:
- 1:4a5e1d1836e0
- Parent:
- 0:f0ec394dd639
- Child:
- 2:3c83ffc5a61a
File content as of revision 1:4a5e1d1836e0:
#include "mbed.h"
DigitalOut led[]= {LED1,LED2,LED3,LED4,LED3,LED2};
Serial pc(USBTX,USBRX);//tx,rx
int main()
{
while(1) {
for(int i=0; i<6; i=1+i) {
led[i]=0;
led[(i+1)%6]=1;
pc.printf("led[%d] is ON\r\n",(i+1)%6);
wait(0.2);
}
}
}
