disco

Dependencies:   mbed

Committer:
happy_alien
Date:
Mon Dec 09 18:23:30 2019 +0000
Revision:
3:94c2e091f621
Parent:
2:1e4e820dfe2b
pwm rgb

Who changed what in which revision?

UserRevisionLine numberNew contents of line
fpucher 0:1b90d953ef92 1 #include "mbed.h"
happy_alien 2:1e4e820dfe2b 2
happy_alien 3:94c2e091f621 3 PwmOut red(p23);
happy_alien 3:94c2e091f621 4 PwmOut green(p24);
happy_alien 3:94c2e091f621 5 PwmOut blue(p25);
fpucher 0:1b90d953ef92 6
fpucher 0:1b90d953ef92 7 int main() {
happy_alien 3:94c2e091f621 8 red=1;
happy_alien 3:94c2e091f621 9 green=1;
happy_alien 3:94c2e091f621 10 blue=1;
happy_alien 3:94c2e091f621 11 while(1)
happy_alien 3:94c2e091f621 12 {
happy_alien 3:94c2e091f621 13 red=red-0.01;
happy_alien 3:94c2e091f621 14 wait_ms(50);
happy_alien 3:94c2e091f621 15 green=green-0.01;
happy_alien 3:94c2e091f621 16 wait_ms(50);
happy_alien 3:94c2e091f621 17 blue=blue-0.01;
happy_alien 3:94c2e091f621 18 wait_ms(50);
happy_alien 3:94c2e091f621 19
happy_alien 3:94c2e091f621 20
happy_alien 3:94c2e091f621 21 }
happy_alien 3:94c2e091f621 22 } // Leds ausschalten