Thanks very much for the reply... unfortunately I'm still lost :-(
The part I'm having trouble with is:
------------------------------------------
ledPWM:
For y = 0 to 2
Select Case y
Case 0
pwm red, rbgarray[y], 1
case 1
pwm green, rbgarray[y], 1
case 2
pwm blue, rbgarray[y], 1
end select
------------------------------------------
I'm under the impression that this program will cycle through the different colors of the rainbow using three different LEDs (ports) - naturally red, green and blue, and varying the duty cycle to each to create the dimming and cycling effect.
I don't see how this part of the code (which calls the PWM of the individual ports) varies the duty cycle differently for each color. Can anybody explain how this works? Or am I misunderstanding the purpose of this program?
Oh, by the way, I have defined the ports "red, green, and blue" as you can see in the code above..
Thanks again!
Bookmarks