can any one help fix sketch ??
still getting to know language
it keeps saying
sketch_jun09a.cpp: In function 'void loop()':
sketch_jun09a:35: error: 'ledPin' was not declared in this scope
sketch_jun09a:38: error: expected `}' at end of input
// Random flasher by mark oldroyd
// Simple random number flasher
// generation and integration into your circuit on the
// arduino.
//
// Circuit build : Simply connect 8 LED's to pins 3,4,5,6,7,8,9,10
// Be sure to connect a resistor to each LED. I used 330 ohms.
//
//
int ranNum;
int ranDel;
void setup() {
// Seed RNG from analog port.
randomSeed(analogRead(0));
// Setup 8 output ports for LED's
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
}
void loop() {
//Generate random number between 8 and 10
ranNum=random(3,11);
// Generate random delay time
ranDel=random(100,400);
//Turn on the LED
digitalWrite(ranNum, HIGH);
delay(ranDel);
// fade out from max to min in increments of 5 points:
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
// sets the value (range from 0 to 255):
analogWrite(ledPin, fadeValue);
// wait for 30 milliseconds to see the dimming effect
delay(30);
}
Moderator edit: code tags added