Having trouble verifying a sketch. I keep getting an error message that reads "error;"servo1" was not declared in this scope.
what does that mean. and how do i fix it....
here is the code...
#include(Servo.h)
Servo servo1;
int photocellPin = 0;
int servoPin = 9;
int pos = 0;
void setup()
{
Serial.begin(9600);
servo1.attach(9);
}
void loop()
{
Serial.print("Cell = ");
Serial.println(analogRead(photocellPin));
pos = analogRead(photocellPin);
pos = constrain(pos,220,740);
int servoPos = map(pos, 220, 740, 255, 0);
int servoDegree = map(servoPos, 255, 0, 0, 179);
servo1.write(servoDegree);
Serial.print("Servo Degree = ");
Serial.println(servoDegree);
delay(50);
}