#include <Servo.h>
int servoPin = 9;
int servoPos = 0;
Servo myServo; // name of servo
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
myServo.attach(servoPin);
}
void loop() {
// put your main code here, to run repeatedly:
myServo.write(servoPos);
}
ketch uses 2450 bytes (7%) of program storage space. Maximum is 30720 bytes.
Global variables use 225 bytes (10%) of dynamic memory, leaving 1823 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x5d
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x5d
Failed uploading: uploading error: exit status 1
I am using an arduino nano with simple code but for some reason im getting this error, im using the correct port, i know this because im using one only and my arduino nano is lit up which means its on so how can i fix this??