LED

Dependencies:   mbed

Fork of BERTL14_BLINK by Wolfgang Raimann

Committer:
bulme_rai
Date:
Wed May 07 09:56:05 2014 +0000
Revision:
0:0c7182a944d4
Testprogramm f?r BERTL2014, der BULME Graz/G?sting; Die LEDs D10-D13 blinken der Reihe nach auf, danach wird noch die RGB angesteuert

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bulme_rai 0:0c7182a944d4 1 /***********************************
bulme_rai 0:0c7182a944d4 2 name: BERTL14_BLINK
bulme_rai 0:0c7182a944d4 3 author: Wolfgang Raimann
bulme_rai 0:0c7182a944d4 4 email: rai@bulme.at
bulme_rai 0:0c7182a944d4 5 description:
bulme_rai 0:0c7182a944d4 6 Die LEDs D10-D13 blinken der Reihe nach auf, danach wird noch die RGB angesteuert
bulme_rai 0:0c7182a944d4 7 ***********************************/
bulme_rai 0:0c7182a944d4 8
bulme_rai 0:0c7182a944d4 9 #include "mbed.h"
bulme_rai 0:0c7182a944d4 10
bulme_rai 0:0c7182a944d4 11 DigitalOut Dio10(LED1);
bulme_rai 0:0c7182a944d4 12 DigitalOut Dio11(LED2);
bulme_rai 0:0c7182a944d4 13 DigitalOut Dio12(LED3);
bulme_rai 0:0c7182a944d4 14 DigitalOut Dio13(LED4);
bulme_rai 0:0c7182a944d4 15 DigitalOut RGB_G(p26);
bulme_rai 0:0c7182a944d4 16 DigitalOut RGB_B(p25);
bulme_rai 0:0c7182a944d4 17 DigitalOut RGB_R(p14);
bulme_rai 0:0c7182a944d4 18
bulme_rai 0:0c7182a944d4 19 int main() {
bulme_rai 0:0c7182a944d4 20 while(1) {
bulme_rai 0:0c7182a944d4 21 Dio10 = 1;
bulme_rai 0:0c7182a944d4 22 Dio11 = Dio12 = Dio13 = 0;
bulme_rai 0:0c7182a944d4 23 RGB_R = RGB_G = RGB_B = 1;
bulme_rai 0:0c7182a944d4 24 wait(0.2);
bulme_rai 0:0c7182a944d4 25 Dio11 = 1;
bulme_rai 0:0c7182a944d4 26 Dio10 = Dio12 = Dio13 = 0;
bulme_rai 0:0c7182a944d4 27 RGB_R = RGB_G = RGB_B = 1;
bulme_rai 0:0c7182a944d4 28 wait(0.2);
bulme_rai 0:0c7182a944d4 29 Dio12 = 1;
bulme_rai 0:0c7182a944d4 30 Dio10 = Dio11 = Dio13 = 0;
bulme_rai 0:0c7182a944d4 31 RGB_R = RGB_G = RGB_B = 1;
bulme_rai 0:0c7182a944d4 32 wait(0.2);
bulme_rai 0:0c7182a944d4 33 Dio13 = 1;
bulme_rai 0:0c7182a944d4 34 Dio10 = Dio11 = Dio12 = 0;
bulme_rai 0:0c7182a944d4 35 RGB_R = RGB_G = RGB_B = 1;
bulme_rai 0:0c7182a944d4 36 wait(0.2);
bulme_rai 0:0c7182a944d4 37 RGB_R = 0;
bulme_rai 0:0c7182a944d4 38 Dio10 = Dio11 = Dio12 = Dio13 = 0;
bulme_rai 0:0c7182a944d4 39 RGB_G = RGB_B = 1;
bulme_rai 0:0c7182a944d4 40 wait(1);
bulme_rai 0:0c7182a944d4 41 RGB_G = 0;
bulme_rai 0:0c7182a944d4 42 Dio10 = Dio11 = Dio12 = Dio13 = 0;
bulme_rai 0:0c7182a944d4 43 RGB_R = RGB_B = 1;
bulme_rai 0:0c7182a944d4 44 wait(1);
bulme_rai 0:0c7182a944d4 45 RGB_B = 0;
bulme_rai 0:0c7182a944d4 46 Dio10 = Dio11 = Dio12 = Dio13 = 0;
bulme_rai 0:0c7182a944d4 47 RGB_R = RGB_G = 1;
bulme_rai 0:0c7182a944d4 48 wait(1);
bulme_rai 0:0c7182a944d4 49 }
bulme_rai 0:0c7182a944d4 50 }