Question about the full color LED
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 11
- Joined: Sat Mar 14, 2009 1:48 am
Question about the full color LED
How is it that the LED is able to display different levels of brightness through only three IO pins? As far as I knew the IO pins were completely binary so shouldn't the led only be able to display 7 colors plus off? I'm very new to the DIY electronics hobby so please try to explain it in simple terms or from a software standpoint only. Thanks in advance.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Question about the full color LED
its called PWM!
heres a kit that is dedicated to PWM'ing leds http://www.pcboard.ca/kits/led_rainbow/
heres a kit that is dedicated to PWM'ing leds http://www.pcboard.ca/kits/led_rainbow/
-
- Posts: 11
- Joined: Sat Mar 14, 2009 1:48 am
Re: Question about the full color LED
Thanks for the answer. I am familiar with the term PWM from first robotics, but I never actually bothered to look up what it meant besides pulse with modulation. Quick wikipedia search and I now know how it works in concept, if not the exact implementation used in the code.
edit: It just dawned on me that this means anytime I want to display more than 7 colors I have to have the LED run on its own separate cog. dang. at least the subsys object is already written, handles the speaker as well, and now I have no reason not to use it.
edit: It just dawned on me that this means anytime I want to display more than 7 colors I have to have the LED run on its own separate cog. dang. at least the subsys object is already written, handles the speaker as well, and now I have no reason not to use it.
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Question about the full color LED
ya pretty much. with AVRs you can use the 'build in PWM' engine but for spin its just another cog
Please be positive and constructive with your questions and comments.