eisei koubou / Mbed 2 deprecated mbed_lab3_koubou

Dependencies:   mbed

Committer:
newhepta
Date:
Fri May 26 03:28:27 2017 +0000
Revision:
0:c8af6bcf2c0c
test3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
newhepta 0:c8af6bcf2c0c 1 #include "mbed.h"
newhepta 0:c8af6bcf2c0c 2
newhepta 0:c8af6bcf2c0c 3 DigitalOut led[] = {LED1,LED2,LED3,LED4};
newhepta 0:c8af6bcf2c0c 4
newhepta 0:c8af6bcf2c0c 5 int main()
newhepta 0:c8af6bcf2c0c 6 {
newhepta 0:c8af6bcf2c0c 7 int i,j;
newhepta 0:c8af6bcf2c0c 8 while(1)
newhepta 0:c8af6bcf2c0c 9 {
newhepta 0:c8af6bcf2c0c 10 for(i=0;i<4;i++)
newhepta 0:c8af6bcf2c0c 11 {
newhepta 0:c8af6bcf2c0c 12 led[i] = 1;
newhepta 0:c8af6bcf2c0c 13 wait(0.5);
newhepta 0:c8af6bcf2c0c 14 }//for(i)
newhepta 0:c8af6bcf2c0c 15 for(j=0;j<4;j++)
newhepta 0:c8af6bcf2c0c 16 {
newhepta 0:c8af6bcf2c0c 17 led[j] = 0;
newhepta 0:c8af6bcf2c0c 18 wait(0.5);
newhepta 0:c8af6bcf2c0c 19 }//for(j)
newhepta 0:c8af6bcf2c0c 20 }//while
newhepta 0:c8af6bcf2c0c 21 }//main