S5 / Mbed 2 deprecated HelloWorld

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

main.cpp

Committer:
bbi22
Date:
2017-01-11
Revision:
2:891e0c33df62
Parent:
0:fb6bbc10ffa0
Child:
3:a420ee3bbe5c

File content as of revision 2:891e0c33df62:

#include "mbed.h"

DigitalOut myleds [] = {LED1, LED2, LED3, LED4};

int main() {
    while(1) {
        for(int i = 0 ; i < 4 ; i++)
            myleds[i] = 1;
        wait(0.2);
        for(int i = 0 ; i < 4 ; i++)
            myleds[i] = 0;
        wait(0.2);
    }
}