Making things flash in all colours

Dependencies:   mbed

Committer:
spyclub
Date:
Sat Jul 12 14:02:17 2014 +0000
Revision:
1:ba3df483c915
Parent:
0:1d9ecfc751ca
shorter off time

Who changed what in which revision?

UserRevisionLine numberNew contents of line
spyclub 0:1d9ecfc751ca 1 #include "mbed.h"
spyclub 0:1d9ecfc751ca 2
spyclub 0:1d9ecfc751ca 3 DigitalOut redLED(LED1);
spyclub 0:1d9ecfc751ca 4 DigitalOut greenLED(LED2);
spyclub 0:1d9ecfc751ca 5 DigitalOut blueLED(LED3);
spyclub 0:1d9ecfc751ca 6
spyclub 0:1d9ecfc751ca 7 int main() {
spyclub 0:1d9ecfc751ca 8 redLED = 1;
spyclub 0:1d9ecfc751ca 9 greenLED = 1;
spyclub 0:1d9ecfc751ca 10 blueLED = 1;
spyclub 0:1d9ecfc751ca 11 while(1) {
spyclub 0:1d9ecfc751ca 12 redLED = 0;
spyclub 0:1d9ecfc751ca 13 wait(2.0);
spyclub 0:1d9ecfc751ca 14 redLED = 1;
spyclub 1:ba3df483c915 15 wait(0.2);
spyclub 0:1d9ecfc751ca 16
spyclub 0:1d9ecfc751ca 17 greenLED = 0;
spyclub 0:1d9ecfc751ca 18 wait(2.0);
spyclub 0:1d9ecfc751ca 19 greenLED = 1;
spyclub 1:ba3df483c915 20 wait(0.2);
spyclub 0:1d9ecfc751ca 21
spyclub 0:1d9ecfc751ca 22 blueLED = 0;
spyclub 0:1d9ecfc751ca 23 wait(2.0);
spyclub 0:1d9ecfc751ca 24 blueLED = 1;
spyclub 1:ba3df483c915 25 wait(0.2);
spyclub 0:1d9ecfc751ca 26 }
spyclub 0:1d9ecfc751ca 27 }