LED

Dependencies:   mbed

Fork of BERTL14_BLINK by Wolfgang Raimann

main.cpp

Committer:
bulme_rai
Date:
2014-05-07
Revision:
0:0c7182a944d4

File content as of revision 0:0c7182a944d4:

/***********************************
name:   BERTL14_BLINK
author: Wolfgang Raimann
email:  rai@bulme.at
description:
    Die LEDs D10-D13 blinken der Reihe nach auf, danach wird noch die RGB angesteuert
***********************************/

#include "mbed.h"

DigitalOut Dio10(LED1);
DigitalOut Dio11(LED2);
DigitalOut Dio12(LED3);
DigitalOut Dio13(LED4);
DigitalOut RGB_G(p26);
DigitalOut RGB_B(p25);
DigitalOut RGB_R(p14);

int main() {
    while(1) {
        Dio10 = 1;
        Dio11 = Dio12 = Dio13 = 0;
        RGB_R = RGB_G = RGB_B = 1;
        wait(0.2);
        Dio11 = 1;
        Dio10 = Dio12 = Dio13 = 0;
        RGB_R = RGB_G = RGB_B = 1;
        wait(0.2);
        Dio12 = 1;
        Dio10 = Dio11 = Dio13 = 0;
        RGB_R = RGB_G = RGB_B = 1;
        wait(0.2);
        Dio13 = 1;
        Dio10 = Dio11 = Dio12 = 0;
        RGB_R = RGB_G = RGB_B = 1;
        wait(0.2);
        RGB_R = 0;
        Dio10 = Dio11 = Dio12 = Dio13 = 0;
        RGB_G = RGB_B = 1;
        wait(1);
        RGB_G = 0;
        Dio10 = Dio11 = Dio12 = Dio13 = 0;
        RGB_R = RGB_B = 1;
        wait(1);
        RGB_B = 0;
        Dio10 = Dio11 = Dio12 = Dio13 = 0;
        RGB_R = RGB_G = 1;
        wait(1);
    }
}