Help with a simple Arduino question!

Hello!
I am very new to Arduino and I am trying to make three rgb LEDs light up with different colors each at the same time. (i'm trying to make a traffic light that works well for colorblind persons) I modified an example for one LED but it's not displaying the correct colors on the second two leds

it should display (dark wine purply red, electric greenish yellow, bright cyan/teal)

however, it displays (dark wine purply red, bright yellow, bright green)

I can get all of the correct colors to appear on the first led, so I think its a problem with the code. Could someone take a look at this for me, and let me know if I'm doing something wrong? I know next to nothing about Arduino but I know Processing very well so I tried to just figure it out.

int redPin = 11;
int greenPin = 10;
int bluePin = 9;

int redPin2 = 7;
int greenPin2 = 6;
int bluePin2 = 5;

int redPin3 = 4;
int greenPin3 = 3;
int bluePin3 = 2;

void setup()
{
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
pinMode(redPin2, OUTPUT);
pinMode(greenPin2, OUTPUT);
pinMode(bluePin2, OUTPUT);
pinMode(redPin3, OUTPUT);
pinMode(greenPin3, OUTPUT);
pinMode(bluePin3, OUTPUT);
}

void loop()
{
setColorStop(120, 17, 84);
setColorCaution(160, 206, 14);
setColorGo(87, 206, 188);
}

void setColorStop(int red, int green, int blue){
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}

void setColorCaution(int red, int green, int blue){
analogWrite(redPin2, red);
analogWrite(greenPin2, green);
analogWrite(bluePin2, blue);
}

void setColorGo(int red, int green, int blue){
analogWrite(redPin3, red);
analogWrite(greenPin3, green);
analogWrite(bluePin3, blue);
}

Nevermind, I figured it out.
I had one wire wrong :stuck_out_tongue:

this is a matter of opinion , i for example am color blind so to get something called bright cyan teal i dont even know i can see that many colors lol , to me everything is very simple
blues and purples look similar
pinks red and greens can also look similar
greens and browns ae some times distinguishable

all these other fancy color names just boil down to one of those 3 for me ,

Now on to your problem I would use a potentiometer connected to your leds and to an analog pin so you can fine tune the colors you want and then do an analog read to get a value from the pot and thus your settings

If they are not actually blind, I'd have a display that lights up "STOP" or "GO"

I don't think all of the pins you are using support PWM. Without looking it up, I think there are only about 5 or 6 that do, and so analogWrite() wouldn't work on the non-PWM pins.

jrdoner:
I don't think all of the pins you are using support PWM. Without looking it up, I think there are only about 5 or 6 that do, and so analogWrite() wouldn't work on the non-PWM pins.

As he say that the problem is solved, he must be using the MEGA board that have 15 pins with PWM. Look it there.

michinyon:
If they are not actually blind, I'd have a display that lights up "STOP" or "GO"

Or X and ↑