I was working on a sketch this morning and I was dealing with pointers and callbacks and something obviously went wrong as the Arduino 2560 is continually looping after about 1 second. My script had a delay of 1000ms before it was trying to do some extra work and then not long later it starts again from the start (I assume it is rebooting).
I can see the output in the serial monitor so it is basically working, but then the code restarts and it does this forever.
I can not upload a new sketch as it fails with a verifiy error after the upload
Binary sketch size: 1,632 bytes (of a 258,048 byte maximum) avrdude: verification error, first mismatch at byte 0x0000 ** 0x01 != 0x14** avrdude: verification error; content mismatch
I assume it is rebooting/resetting during the upload or something?
Is there any way to get this device back? I have no idea how to proceed.