Problem involving Serial

I’m a new Arduino Uno user. I am trying the DigitalReadSerial example sketch, and I’m getting the following messages:

avrdude: stk 500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect 0x14, resp=0x51

I’m using Windows 7 64-bit.
Any suggestions?
Jeff

The error itself is a generic message. Google will quickly confirm that. The error is exactly what it says, avrdude (the program that does the actually programming) wasn't able to talk to the programmer (the bootloader on the Uno.)

Did this error start after you were already doing something else with serial? Sometimes it is possible for the ATmega328 and the 8u2 (serial to usb converter on the Uno) to get screwed up when serial data is sent too soon.

First, try manually RESETing the board (with the push button) when uploading code. Press the button 1-2 seconds after the "Sketch Size" message appears.

If that doesn't work, then try disconnecting the board from power. Press and hold RESET. Connect to power while holding reset. Then release RESET 1-2 after the "Sketch Size" message appears.

The idea behind the 2nd method is that it holds the ATmega328 in RESET so that it never sends anything to the 8U2. This gives the 8U2 a chance to start the re-programming process.

I tried both suggestions. Neither worked. Actually, this is the first time I had tried doing anything involving serial. I'm trying to resolve this issue now, since I will be doing other things involving serial.

Do you have anything connected to the Arduino? If so, which pins?

jstanton: I tried both suggestions. Neither worked. Actually, this is the first time I had tried doing anything involving serial. I'm trying to resolve this issue now, since I will be doing other things involving serial.

Your problem is related to programming the Arduino's flash.

The fact that the sketch includes anything involving serial is likely to be unrelated.

Would you believe I had the circuit wired wrong!? The printed image was misleading (at least to me), so I went with the circuit schematic on the next page, and all was well. Sorry to bother you with a foolish mistake.