Go Down

Topic: Help please. Error uploading to Arduino.. (Read 5 times) previous topic - next topic


My Arduino software and board have been working perfectly until now.
When I run a simple Digital Read Serial program I get the follow error when I try to upload it to my Arduino.

Binary sketch size: 2248 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

It appears both my Board type and COM port are correct so I'm not sure what else it could be ..


James C4S

This error is usually the result of the ATmega not getting reset automatically. 

Try pressing the Reset button on the board just after the "Binary Sketch Size" message.  You might have to try a couple of times to get it just right.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


The Arduino script I am running is a simple "Digital serial read" script.
here is the script:
void setup() {
  pinMode(0, INPUT);
void loop() {
  int sensorValue = digitalRead(0);
  Serial.println(sensorValue, DEC);

I have discovered if I set my input pin to 0 I get the error message as outlined in the beginning of this post. If I set my input to 1 I get a strange serial output (not what I am expecting). If I set it to 2 I get the serial output I am expecting.

Are the digital pins 0 & 1 reserved for something else ?


Digital pins 0 and 1 are shared with the serial communication that goes over USB to the computer.

Go Up