Now I go to download the blink sketch. I get the following error:
Code: Select all
avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x00
avrdude: stk500_cmd(): programmer is out of sync
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:125)
at processing.app.Sketch.upload(Sketch.java:1719)
at processing.app.Sketch.exportApplet(Sketch.java:1625)
at processing.app.Sketch.exportApplet(Sketch.java:1597)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2397)
at java.lang.Thread.run(Thread.java:695)
Caused by: processing.app.debug.RunnerException: Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:111)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:123)
... 5 more
MAC OS X 10.9.3
Arduino IDE 1.5.6-r2
FTDI Friend
Downloaded FTDI drivers for 64-bit Mac OS X
Installed the FTDI_UsbSerialDriver_10_4_10_5_10_6_10_7
All the lights light as expected. Power is from an external (2.1mm connector) 5V source. Power light is green. When I hit reset, red light blinks as expected. When I request a download, the red light blinks, as do the red and green LEDs on the FTDI Friend (and yes, it is plugged in green-to-green/black-to-black). Then I get the message. But sometimes the MENTA goes comatose (no blinking red light), and occasionally the sketch will load and run, but I still get the message shown above. Reset, if the MENTA goes comatose, does not cause either the new or the previous program to run. The red light blinks, but nothing happens.
And yes, I did read the upload troubleshooter article cited in the error message, but it did not suggest anything that seemed to apply. The fact that *some* uploads work is not a failure mode it seems to cover.
If I unplug the USB cable, the port (as expected) goes away. When I plug the cable back in, the port returns. I have selected
Board: Aduino Due**** or Die**** (short-term memory is inadequate to let me remember the spellings)
Processor: AtMega 328
Port: /dev/tty.usbserial-A5027Z1Z
Note that I *always* get the error message, but sometimes the sketch uploads and sometimes it doesn't. And there seems to be no consistent way to reproduce this. If I try to download the identical sketch again, sometimes it succeeds, sometimes it fails. Because I could not tell a "succeed" from a "fail, but left old program intact", I usually don't try to download the identical bits; I change the timing in blink.cpp so I will see either short blinks or long blinks, but even if I try to download the same bits, I see enough of the "comatose" events that I believe I can safely dismiss any example of operating code as NOT being from a "fail, but runs last sketch" case. So my two cases are: (1) download "fails" but in fact the IDE is lying to me; it has worked, because I see the red light blinking, and (2) download "fails" because it has really failed, and the machine is left comatose.
Any ideas why it is failing so mysteriously? (The "madness" part is on my side of the cable. When are those Trinket Pros going to be back in stock?)
joe