I'm trying to do project #5 in the Arduino Projects book and get a compiling error:
"core.a(main.cpp.o): In function main': Downloads/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:11: undefined reference to setup' "
Here's my code, copied straight from the book:
#include <Servo.h>
Servo myServo;
int const potPin = A0;
int potVal;
int angle;
void Setup(){
myServo.attach(9);
Serial.begin(9600);
}
void loop() {
potVal = analogRead(potPin);
Serial.print("potVal: ");
Serial.print(potVal);
angle = map(potVal, 0, 1023, 0, 179);
Serial.print(", angle: ");
Serial.println(angle);
myServo.write(angle);
delay(15);
}