Hi I'm trying to upload this code for lesson 3 RGB LED but I constantly get the error message I have pasted below. What am I doing wrong?
Pls help
void setup() {
//Define Pins
#define BLUE 3
#define GREEN 5
#define RED 6
(analogWrite); redValue = 255;
(analogWrite); greenValue = 0;
(analogWrite); blueValue = 0;
//choose a value between 1 and 255 to change the color.
pinMode(RED, OUTPUT);
pinMode(GREEN, OUTPUT);
pinMode(BLUE, OUTPUT);
digitalWrite(RED, HIGH);
digitalWrite(BLUE, LOW);
digitalWrite(GREEN, LOW);
}
Error message as follows:
Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Uno"
C:\Users\hrish\Documents\Arduino\sketch_sep05a\sketch_sep05a.ino: In function 'void setup()':
sketch_sep05a:8:16: error: 'redValue' was not declared in this scope
(analogWrite); redValue = 255;
^~~~~~~~
C:\Users\hrish\Documents\Arduino\sketch_sep05a\sketch_sep05a.ino:8:16: note: suggested alternative: 'rename'
(analogWrite); redValue = 255;
^~~~~~~~
rename
sketch_sep05a:9:16: error: 'greenValue' was not declared in this scope
(analogWrite); greenValue = 0;
^~~~~~~~~~
C:\Users\hrish\Documents\Arduino\sketch_sep05a\sketch_sep05a.ino:9:16: note: suggested alternative: 'rename'
(analogWrite); greenValue = 0;
^~~~~~~~~~
rename
sketch_sep05a:10:16: error: 'blueValue' was not declared in this scope
(analogWrite); blueValue = 0;
^~~~~~~~~
exit status 1
'redValue' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.