My 10 year old received great gift from older brother (Crate Creations) and I am trying write the program and getting this error. It looks to me that I matched the required code word for word symbol for symbol but I just can't figure out what I did wrong:
void loop () {
for (float x = 0; x < PI; x = x + 0.00001) {
RGB[0] = power * abs(sin(x * (CommonMathVariable)));
RGB[1] = power * abs(sin((x + PI/3) * (CommonMathVariable)));
RGB[2] = power * abs(sin((x + (2 * PI) / 3) * (CommonMathVariable)));
ambientLight = analogRead(ldrPin);
if (ambientLight > 600) {
analogWrite (redLed.RGB[0]);
analogWrite (greenLed.RGB[1];
analogWrite (blueLed.RGB[2];
}
I get this error:
request for member 'RGB' in 'redLed' , which is of non-class type 'int'
int pulseSpeed;