Ok, so I’ve been trying to troubleshoot this problem for about a week, to no success. So I am turning to the forum gods for assistance.
I have an arduino Fio (atmega328p), 2-xbees (series 2, unfortunately), and the xbee USB explorer. I was able to upload sketches to the Fio successfully using the Xbee’s.
In trying to learn the coding, I uploaded the Arduino Example sketch DigitalReadSerial, and forgot to change the Baud Rate from 9600 to 57600. That sketch uploaded successfully.
However, since then, I have not been able to upload any sketches successfully.
This is the error I get, but it seems pretty vague:
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0xe0
I tried changing the BD to 9600 on the Xbees, but that didnt work. I tried resetting all the Xbee conditions, but that didnt work. I am certain the xbee’s are communicating because in serial monitor, i get a steady stream of “àààààà”
my searches show that its likely because the DigitalReadSerial immediately turns on Serial.begin, and Serial.println without any delays, which causes the arduino to be overloaded. The only solution to this I’ve seen is to update the firmware to “erase” the current sketch on the arduino. This site gives instructions:
http://arduino.cc/en/Hacking/DFUProgramming8U2
But I am using mega328p, not 8u2 (or the uno). I tried the flip software, but they have nothing for the Fio. So I am not able to update the firmware to solve my issue. Has anyone had success in similar situations as mine?
Also, I was thinking that maybe my problem is timing. I tried resetting at many different times during upload, none of them successful. Is it possible that the Xbee communication is too slow to trigger sketch upload in the small time frame between start-up and serial begin? If this is the case, would buying an FTDI cable to do wired upload of a sketch solve my problem?
thanks in advance