Go Down

Topic: Get an LED to become a certain color (Read 439 times) previous topic - next topic

STS_MR2

Any suggestions on how to address an LED to be a specific color, like using an RGB LED (or another one if you have any ideas) and being able to assign (like in photo editing and such when assigning colors on a scale of 0-255) a color combination like the following?
Red = 200
Blue = 155
Green = 201

Can this be done with the PWM (which is a scale of 0-255)?

Any ideas on a good  LED (undiffused) for this?

pYro_65

#1
May 11, 2012, 04:51 am Last Edit: May 11, 2012, 04:56 am by pYro_65 Reason: 1
essentially the different duty cycles of PWM make the led get brighter or dimmer.

On an RGB LED, using PWM can control the intensity of each element allowing you to get almost any colour.
This is the same as pixels, each element has a certain intensity.

Due to the different physical qualities of each element in the LED the relationship is probably not exact.

Check out ShiftPWM or any of the fine examples here on the forum ( search bar above right ).
Or simply whack an RGB LED and a few resistors into the PWM ports and have a play.

This is the place I bought mine from: http://stores.ebay.com.au/LED-Wholesale-World/4pin-RGB-Anode-Cathode-LED-/_i.html?_fsub=2441707010&_sid=1016205190&_trksid=p4634.c0.m322

I'm currently using some of the 5mm common cathode versions. They seem good quality.

Go Up