This may be in the wrong area but can somebody tell me whats wrong with the code? I have it all set up right, however, when I upload it it tells me to add extra characters. When I add them it tells me there are more wrong ones. Can some one fix the line that is giving my trouble? Im still new to this.)
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(12, OUTPUT);
digitalWrite(12, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(12, LOW); // set the LED off
delay(1000); // wait for a second
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(11, OUTPUT);
digitalWrite(11, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(11, LOW); // set the LED off
delay(1000);
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(10, OUTPUT);
digitalWrite(10, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(10, LOW); // set the LED off
delay(1000);
// LED leads connected to PWM pins
const int RED_LED_PIN = 9;
const int GREEN_LED_PIN = 8;
const int BLUE_LED_PIN = 7;
// Used to store the current intensity level of the individual LEDs
int redIntensity = 0;
int greenIntensity = 0;
int blueIntensity = 0;
// Length of time we spend showing each color
const int DISPLAY_TIME = 100; // In milliseconds
// Cycle color from red through to green
// (In this loop we move from 100% red, 0% green to 0% red, 100% green)
for (greenIntensity = 0; greenIntensity <= 255; greenIntensity+=5) {
redIntensity = 255-greenIntensity;
analogWrite(GREEN_LED_PIN, greenIntensity);
analogWrite(RED_LED_PIN, redIntensity);
delay(DISPLAY_TIME);5
// Cycle color from green through to blue
// (In this loop we move from 100% green, 0% blue to 0% green, 100% blue)
;for blueIntensity = 0; blueIntensity <= 255; blueIntensity+=5)
greenIntensity = 255-blueIntensity;
analogWrite(BLUE_LED_PIN, blueIntensity);
analogWrite(GREEN_LED_PIN, greenIntensity);
delay(DISPLAY_TIME);5
// Cycle cycle from blue through to red
// (In this loop we move from 100% blue, 0% red to 0% blue, 100% red)
for (redIntensity = 0; redIntensity <= 255; redIntensity+=5)
blueIntensity = 255-redIntensity;
analogWrite(RED_LED_PIN, redIntensity);
analogWrite(BLUE_LED_PIN, blueIntensity);
delay(DISPLAY_TIME);5
}
}
}