Colour changing LED and arduino

Hi all....

i was just wondering if anyone has used with arduino an LED that is white but can be turned blue?

Does anyone know if they exist... I am using infrared sensors with the arduino and wanted to have the white LED on and then when the sensor is triggered the LED change to blue. Also would this, if possible, be run usingthe pwm port?

Would be great if anyone could shed some light on the issue (excuse the pun). Thanks in advance

:slight_smile:

You can buy red/green/blue (RGB) LEDs that can simulate white light by giving it equal current on red/green/blue, and then to get blue, simply turn off red and green.
You could do this with two PWM channels, but I've never heard of a white/ blue LED

Agreed with the RGB leds, just make sure you get Diffused, so the colors will blend together better. You can also sand the surface for the same kind of idea.

Here's a link.. I've never heard of this vendor.. just searched "Dual color LED white blue" you could probably find some elsewhere.
http://www.jab-tech.com/3mm-Dual-Color-Blue-White-Led-10-Pack-pr-3573.html

ahh cool, how come 2 pwm channels... would it not be one and then to ground... then in the code simpy changing the output from the pwm?

or is it that you need one pwm sending one output, for white (RGB) and then the other for blue (B) and then depending on the iput choosing either of the pwms?

ahh so that link shows a blue white LED, dual colour....

woudl that work on the same principle as i just stated above? 2 pwm ports?

Nope, with those you can just use two digital ports, just need to make sure the opposite LED is off. (you can have them both on at the same time.. just give you a lighter blue I'm guessing)

You just need PWM to get the colors to match to get the white, with those LED's, they're just.. white and blue :slight_smile:

You only need pwm if you want to vary the brightness.
Assuming an RGB LED, that's one channel for blue, and one channel shared between red and green.

thankyou so much.

So really those dual olour blue whites are just 2 leds stuck together in one 3 mm space and then a port for each colour… fairly simple, wish it all worked off one port mind as got a few of these things, pretty annoying, nevermind.

:slight_smile: