RGB blink on PA6, 7 & PB6

Dependencies:   mbed

Committer:
penbird97
Date:
Fri Nov 28 22:07:48 2014 +0000
Revision:
0:7e4496198746
Blinking RGB device on PA6, 7 & PB6

Who changed what in which revision?

UserRevisionLine numberNew contents of line
penbird97 0:7e4496198746 1 #include "mbed.h"
penbird97 0:7e4496198746 2
penbird97 0:7e4496198746 3 DigitalOut Rouge(PB_6);
penbird97 0:7e4496198746 4 DigitalOut Vert(PA_6);
penbird97 0:7e4496198746 5 DigitalOut Bleu(PA_7);
penbird97 0:7e4496198746 6
penbird97 0:7e4496198746 7 int main() {
penbird97 0:7e4496198746 8 while(1) {
penbird97 0:7e4496198746 9 Rouge = 1; // LED is ON
penbird97 0:7e4496198746 10 wait(0.2); // 200 ms
penbird97 0:7e4496198746 11 Vert = 1;
penbird97 0:7e4496198746 12 Bleu = 1;
penbird97 0:7e4496198746 13 Rouge = 0; // LED is OFF
penbird97 0:7e4496198746 14 wait(1.0); // 1 sec
penbird97 0:7e4496198746 15 Vert = 0;
penbird97 0:7e4496198746 16 Bleu = 0;
penbird97 0:7e4496198746 17 }
penbird97 0:7e4496198746 18 }