Stéphane PEREZ
/
Nucleo_blink_led_RGB
RGB blink on PA6, 7 & PB6
Revision 0:7e4496198746, committed 2014-11-28
- Comitter:
- penbird97
- Date:
- Fri Nov 28 22:07:48 2014 +0000
- Commit message:
- Blinking RGB device on PA6, 7 & PB6
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Nov 28 22:07:48 2014 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" + +DigitalOut Rouge(PB_6); +DigitalOut Vert(PA_6); +DigitalOut Bleu(PA_7); + +int main() { + while(1) { + Rouge = 1; // LED is ON + wait(0.2); // 200 ms + Vert = 1; + Bleu = 1; + Rouge = 0; // LED is OFF + wait(1.0); // 1 sec + Vert = 0; + Bleu = 0; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Nov 28 22:07:48 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file