Nov 7, 2010 at 6:33pm
i’ve been having issues figuring out how to control red, green, blue and white LEDs with Max using an arduino. I need to be able to control the brightness of the LEDs, not just on/off values. Anyone have any suggestions? I’ve been using a modification of “simple message system” (http://www.arduino.cc/playground/Code/SimpleMessageSystem) that uses keystrokes as toggle switches for the LEDs.
Included is the arduino code, my patch, and the max externals necessary for running the now modified “simple message system”.
p.s. i’m also having some problems with the LEDs themselves – when i try and turn all 4 on simultaneously, the arduino seems to get a little overloaded and some don’t turn off when i release the keys (some don’t turn on as well).
thanks a lot everyone!!!
Nov 7, 2010 at 7:46pm
I would highly recommend you trying out Maxuino for Max
Just upload Firmata v2.1 onto your arduino, then load the maxuino test patch.
If you want to fade the LED’s then you will need to use PWM (pulse width modulation) outputs on your arduino.
You need 3 arduino channels of PWM (for ‘each’ RGB LED), but there are ways of increasing your available PWM channels (search the arduino forum for TLC5940).
If your using normal LEDS though, just one PWM channel is needed per LED.
Hope that helps, good luck with your project.
You must be logged in to reply to this topic.