I'm having some problems with the LED. For some reason, it's really hard to make it glow green. I know that the LED is functioning properly, I've made it glow only green, but as soon as I mix colours I get this problem. My r, g and b values are very similar to each other when equally exposed to a light source. They also correspond to being covered up in the same way.
My friend has the same problem as me. Is making the LED glow green some inherent problem this type of LED has or have I made some mistake?
This is my scaled down code, without the printing and stuff.
int r, g, b;
void setup() {
Serial.begin(9600);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
r = analogRead(A0);
g = analogRead(A1);
b = analogRead(A2);
analogWrite(11, (r/4));
analogWrite(9, (g/4));
analogWrite(10, (b/4));
}