SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By edokassiah
#165601
hey guys i wanna be able to control 4 or 2 rgb diffused leds
what i basically wanna do is have several modes
mode 1 red mode 2 blue etc the full color spectrum then all leds off
all 4 or 2 leds will light up the same
if possible i want to be able to change modes via a tact switch any advice i will also compensate for someone help if needed
would an arduino mini pro be good for this? as i have one laying around also a arduino uno
By Mee_n_Mac
#165662
edokassiah wrote:would an arduino mini pro be good for this? as i have one laying around also a arduino uno
Sure, you only need 3 control outputs doing PWM to get more colors and intensities that you described. The only question is how much current is needed for the LEDs and whether a 'driver' of some sort is needed.. Are you using 'normal' LEDs or high power ones ?

Frankly if all you want modes is off:red_on:green_on:blue_on:all_on, that could be done w/o a micro. All you need is a multi-position switch.
By axipher
#165725
This can easily be done with an Arduino and 3 of it's PWM outputs to 3 MOSFET's. MOSFET's are fast enough that you can dim it using Arduino analogWrite function to the PWM pin then just supply 5V and a current limiting resistor to each leg of the LED. I *think* that what you would need is common Anode RGB LED's so you can switch the Cathodes with the MOSFET' (I always mix anode and cathode up no matter how many times I look them up)