A program to control an RGB LED using PWM outputs from the RenBED.
Revision 1:403bf5e66837, committed 2016-04-15
- Comitter:
- RenBuggy
- Date:
- Fri Apr 15 08:34:55 2016 +0000
- Parent:
- 0:f4b16c0de4df
- Child:
- 2:c9141fc3900d
- Commit message:
- .
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Apr 15 07:25:48 2016 +0000 +++ b/main.cpp Fri Apr 15 08:34:55 2016 +0000 @@ -1,5 +1,5 @@ /********************************************************* -*RenBED_RGB * +*RenBED_RGB_PWM * *Author: Elijah Orr * * * *A program that changes the colour of an RGB LED by * @@ -35,9 +35,9 @@ for(;;){ Red = 0.7; /* Duty cycle on red pin set to 70% so red is on 30% of the time */ Green = 0.4; - wait_ms(3000); + wait_ms(3000); /* wait for 3000 ms */ Red = 1; /* Duty cycle set to 100% to turn red off */ - Blue = 0; + Blue = 0; /* Duty cycle set to 0% to turn blue fully on */ wait_ms(3000); Green = 1; wait_ms(3000);