Hey guys, i am playing with my arduino board and trying to get my potentiometer to turn on my RBG LED's red light (was going to eventually try to get it to go through all the colors as i rotate the potentiometer but thats a long ways away yet) and i keep getting a error when i try to compile it, i can't figure it out. Wondering if perhaps one of the more experienced persons can help me figure out whats going on here.
Heres my little project
const int RED_LED_PIN = 9;
const int GREEN_LED_PIN = 10;
const int BLUE_LED_PIN = 11;
const int DISPLAY_TIME = 100;
int redIntensity = 0;
int greenIntensity = 0;
int blueIntensity = 0;
int sensorPin = A5;
int sensorValue = 0;
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
sensorValue = analogRead(sensorPin);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
if (sensorValue < 255);
redIntensity = 255
analogWrite(RED_LED_PIN, redIntensity);
}
// print out the value you read:
Serial.println(sensorValue);
}
and my error is this
ReadAnalogVoltagefxkk.cpp: In function 'void loop()':
ReadAnalogVoltagefxkk:35: error: expected `;' before 'analogWrite'
ReadAnalogVoltagefxkk.cpp: At global scope:
ReadAnalogVoltagefxkk:38: error: expected constructor, destructor, or type conversion before '.' token
ReadAnalogVoltagefxkk:39: error: expected declaration before '}' token