Testet die RGB
Dependencies: mbed
Revision 1:727c55ba9d9f, committed 2015-06-15
- Comitter:
- winkler_martin
- Date:
- Mon Jun 15 18:25:59 2015 +0000
- Parent:
- 0:28a4d412f331
- Commit message:
- RBG led...
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu May 28 09:55:29 2015 +0000 +++ b/main.cpp Mon Jun 15 18:25:59 2015 +0000 @@ -16,27 +16,27 @@ while(1) { while(green <= 255) { - green = green + 1; + green = green + 5; ledgreen = (100 - green)/100; wait(time); } while(red >= 0) { - red = red - 1; + red = red - 5; ledred = (100 - red)/100; wait(time); } while(blue <= 255) { - blue = blue + 1; + blue = blue + 5; ledblue = (100 - blue)/100; wait(time); } while(green >= 0) { - green = green - 1; + green = green - 5; ledgreen = (100 - green)/100; wait(time); } while(red <= 255) { - red = red + 1; + red = red + 5; ledred = (100 - red)/100; wait(time); }