connection an RGB led to an arduino with breadboar

This is probably a very easy to answer question, but i am a newbie to electronics...

I want to connect a led using the PWM pins of the Arduino Duemilanove.

I think i have an rgb led with a common anode. (it has four pins)

Could someone please tell me exactly what the wiring has to be?
I have managed to get a single "sub" led (red/green/blue) working, but not the rgb combination...

thanks in advance

Well the common anode witch is the longest pin goes to 5V, and with a resistor(you must use 3 resistors, one for each pin) you connect the rest of the pins to the PWM outputs of the arduino.

Hope it help.

The anode goes to ground, right, not +5V ?

Anode is the positive pin and cathode is the negative one.

thanks, i got it working now :slight_smile:
but i tought i would be able to mix colors without nicely.. Green seems to be much brighter, and since it is the in the middle of the led, there is no color mixing at all. i tried a bigger resitser value for the green without much effect.
On youtube there are some examples of an onscreen color picker, where the color of the led is exactly the same as on screen (without a diffuse box around the led)

I use a 5MM "water clear" RGB led. I don't know the specs, i only told that i should be able to run it on the 5v of the arduino so i got this.

Any idea's to improve this?

I would say that you should diffuse your LED because you can't see the color mixing with a clear LED, just take a fine sandpaper and sand the LED, that way you will see the color mixing.
And about the green being brighter your fix should work.

i tried a bigger resitser value for the green without much effect.

What resistor value did you try?
I used something like 820R for green with 620R for blue and 200R for red with the LEDs I had. Even then the green and blue were too bright.