Wassim Bouaziz
/
CouleurLED
Led qui change de couleur
Revision 0:de23ac5e6daa, committed 2013-05-08
- Comitter:
- Wabouz
- Date:
- Wed May 08 12:32:59 2013 +0000
- Commit message:
- Couleurs
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 |
diff -r 000000000000 -r de23ac5e6daa main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed May 08 12:32:59 2013 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +PwmOut Red(p23); +PwmOut Green(p24); +PwmOut Blue(p25); + +int main() +{ + unsigned char R, G, B; + + Red.period_ms(1); + Green.period_ms(1); + Blue.period_ms(1); + while (1) { + for (R = 0; R < 100; R++) { + Red.pulsewidth_ms(R); + for (G = 0; G < 100; G++) { + Green.pulsewidth_ms(G); + for (B = 0; B < 100; B++) { + Blue.pulsewidth_ms(B); + } + } + } + } +}
diff -r 000000000000 -r de23ac5e6daa mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed May 08 12:32:59 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7e6c9f46b3bd \ No newline at end of file