Hi there,
I have been troubleshooting an issue for the past 3-4 days and have concluded I need some help.
I have a rather large sketch that I am trying to run on an Arduino YUN. Because of the sketch's size I have been loading without the bootloader using a USBTinyISP and Terminal on Mac OSX.
If after I upload the sketch with the USBTinyISP, I leave the USBTinyISP attached to the YUN (providing power, but no data exchange), my sketch loads/runs properly, which is great!
The problem:
However, if I unplug the UBSTinyISP and plug the YUN into an AC/DC adapter through the USB micro port, the board will power up (On LED and RX LED lit), but the sketch does not actually run. The same behavior occurs if I unplug the USBTinyISP and then replug it. The same behavior occurs when I press the 32U4 reset button.
So the error seems to occur when the YUN is rebooted. It is frustrating, because the sketch fits on the YUN and runs great when following the initial upload as long as I don't power the YUN off or restart it.
Has anyone seen this type of issue? If I don't use the bootloader to upload the sketch am I failing to upload some code onto the YUN that allows it to reset/reboot properly? Is this a known issue when you upload sketches in this way? Are there solutions? I haven't seen anything about this on-line.
The sketch fits in the flash memory and runs great, but it is large. Is it possible that because the memory is pretty full, the sketch can't be rebooted?
One thing I have noted:
When the sketch works the On LED, the RX LED and the TX LED are all lit. When the sketch doesn't work the On LED and the RX LED are lit, but the TX LED is not. This seems important, but I'm not sure how.
I have attached the code, just in case it might be useful to look at it to troubleshoot this issue.
I really appreciate any advice that might account for this behavior. Again, its just frustrating that everything does work, but that it can't recover from a power-down.
Thank you for your help. I greatly appreciate any assistance.
Nate Miller
YUN_TestUnpredict_wMonth.ino (24.7 KB)