Beginner in Arduino, Can't Upload to my Uno Board

Hey all,

I am recently just starting to learn the basics in Arduino, but I am having a few issues getting started. I recently purchased a 4 axis Sainsmart robot arm and figure I would just start off learning the basics on how to program a single servo motor located on the robot. I got a basic servo program from the Arduino website and wired the mechanism accordingly. I copied and pasted the program verbatim, but for some reason I am unsuccessful in trying to upload the program to my board. The error is as follows.

Sketch uses 2158 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 52 bytes (2%) of dynamic memory, leaving 1996 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=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfb
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xfb

I have tried everything and done everything on arduino’s website, but nothing seems to do the trick. I probably am missing something super obvious, but I just can’t seem to figure it out. I have made sure I have the correct board and port selected, but I get this error every single time. Someone please help me. I just wanna get this robot to move lol. Thanks in advance. The program I am running is also listed below.

/* Sweep
by BARRAGAN http://barraganstudio.com
This example code is in the public domain.

modified 8 Nov 2013
by Scott Fitzgerald

*/

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
}

Why aren't you using their examples ?

I have tried using the examples as well, and even a simple blink program, but I am unable to upload it to the board and get the same exact error.

Is your board recognised in device manager (Windows) or its Linux/Mac counterparts?
If yes, did you select the correct port?
If yes, have you tried the loopback test?

My board is recognized in the device manager and I have made sure it is connected to the correct port (in this case COM 3). I guess if you could bare with me here but how do you perform a loop back test?

Ok so I researched how to perform a loop back test and I still get the same error and am unable to program or upload anything to the board. This is so frustrating. Could my board or cord just be faulty????

If the loopback test is succesfull, your USB cable is OK.
Did you select the correct board?

loopback test failed. I believe this board is faulty considering it is not a legit Arduino made board. I have a new one on order (Arduino uno) I will keep you updated on if this works. Thanks for the help thus far! Appreciate it.

sterretje:
If the loopback test is succesfull, your USB cable is OK.

If the loopback test failed, did you try using another USB cable? It might be worth an attempt while you are waiting for your new board.

and you installed the driver ?? and the library in the correct place (folder C: \ ...... \ .... \ Documents \ Arduino \ libraries)?

If it’s nit a genuine UNO it probably has a different coms chip - try loading a CH340 driver for it
Good article here:

https://www.google.co.uk/amp/www.instructables.com/id/How-to-fix-bad-Chinese-Arduino-clones/%3Famp_page=true

hammy:
If it’s nit a genuine UNO it probably has a different coms chip - try loading a CH340 driver for it

With a missing driver it would not be recognised as a com port.

maybe you have the driver installed incorrectly or the library in the wrong place probably?