I set up an RGB LED per the Adafruit tutorial. It was the RGB led from the adafruit kit.http://learn.adafruit.com/adafruit-ardu ... ino-sketchWhy do I get RED with setColor(0, 255, 255); ????? setColor(255, 255, 255); turns everything off?Using 3 560 ohm resistors. Is it the resistors?

The RGB LED is a "Common Anode" led. The anode for R, G & B is tied to +5v and the three cathodes are pulled low to turn them on. This means that all the logic is inverted.

With setColor(255, 255, 255), all three cathode resistors are at 5v, so there is no voltage across the LED. With setColor(0, 0, 0), the cathode resistors are at 0v, so there is a 5v drop and the led illuminates.

adafruit_support wrote:The RGB LED is a "Common Anode" led. The anode for R, G & B is tied to +5v and the three cathodes are pulled low to turn them on. This means that all the logic is inverted.

With setColor(255, 255, 255), all three cathode resistors are at 5v, so there is no voltage across the LED. With setColor(0, 0, 0), the cathode resistors are at 0v, so there is a 5v drop and the led illuminates.

Excellent! After I posted this I wrote code and figured it out but I was not sure why it worked.Thank you so much for the reply.

by adafruit_support » 01 Jan 2013 11:53With setColor(255, 255, 255), all three cathode resistors are at 5v, so there is no voltage across the LED. With setColor(0, 0, 0), the cathode resistors are at 0v, so there is a 5v drop and the led illuminates.

Haven't done the tutorial for RGB's yet. I ordered the Diffused RGB (tri-color) 10mm LED (10 pack) and a few Clear 'Piranha' Super-flux RGB (tri-color) LED's. Still waiting for them to get here in the mail. Should be in a few days now.

But I'm curious. So are the three 255's in the order R G B? and will having 0 0 0 make it look white then? 0 255 0 purple? etc etc...