Hi! I'm doing a project from a book I found and all of the testing code I run so far for the servo motors has worked. I've moved on to trying to get the dang thing to move forward but keep getting the below error message:
Arduino: 1.8.15 (Mac OS X), Board: "Arduino Uno"
/var/folders/kd/dr_xcys52b73yk0g3s4qybdh0000gn/T//cc9I3BMi.ltrans0.ltrans.o: In function main': /private/var/folders/kd/dr_xcys52b73yk0g3s4qybdh0000gn/T/AppTranslocation/11020319-1484-45DA-B896-A821175447C3/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/main.cpp:43: undefined reference to
setup'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.
This is the code from the book I'm following:
#include <Servo.h>
Servo frontServo;
Servo rearServo;
int centerPos = 90;
int frontRightUp = 72;
int frontLeftup = 108;
int backRightForward = 75;
int backLeftForward = 105;
void moveForward()
{
frontServo.write(frontRightUp);
rearServo.write(backLeftForward);
delay(125);
frontServo.write(centerPos);
rearServo.write(centerPos);
delay(65);
frontServo.write(frontLeftup);
rearServo.write(backRightForward);
delay(125);
frontServo.write(centerPos);
rearServo.write(centerPos);
delay(65);
}
void Setup()
{
frontServo.attach(2);
rearServo.attach(3);
}
void loop()
{
moveForward();
delay(150); // Time between each step take, speed of walk
}