HELP! How to DOWNload Arduino sketch (harddisk crashed)

Hi, my harddisk has crashed and the backup doesn't seem to work. I have lost my Arduino project sketch on which I am currently working! The only place I still do have the sketch is within the Arduino board itself. Is there a way of downloading it back onto the PC (actually the reverse of the upload is what I would need)? Any help is highly appreciated. Thank you very much.

The sketch is definitely not in your Arduino, only an executable image is in there which can be extracted by means of AVRDUDE.EXE and the -D option IIRC.

I'm sorry your harddisk crashed; - will it not boot ? - or is access completey gone? - did you try to install it as secondary/external disk - e.g. Ubuntu booted from CD - save gig's of data from crashed windows HD's that way.

Why did the backup not work?

To recover a sketch from a arduino would require a great deal of work and programming skill. Much easier to rebuild the sketch.

I have lost sketches by having my laptop stolen and having the battery die and the computer crashed. I have learned the value of making local backups and off site backups. If you using Ubuntu check out ubuntu one (cloud).

@robtillart,mrtaylor Thank you very much for your help. I have continued trying to get my backup to work again, plugged it in in different plugs again and again und suddenly it worked again. In the future I think I will change my backup strategy, do backups more frequently and regularly and on at least 2 different media. Thanks again.

PS: Regarding the executable that I could have recovered from the Arduino, is there a tool with which I could have gotten back a readable sketch from it?

Regarding your PS: NO.

Nowadays there are so MANY options for backups. 16GB usb sticks (and even very fast ones) are so cheap these days...

And if you should be running a decent operating system, I recommend using GIT for code. It is sooo nice to have access to the complete history of what you did. You can go back, look at the differences, add comments (so you can remember why you did what you did)...

is there a tool with which I could have gotten back a readable sketch from it?

Not possible. What resides in the chip is the AVR machine language instructions from the output of the Gcc compiler. The original sketch source text only resides on your PC. Trying to read back and take the machine language instructions, reassemble it to assembly code text and then try and convert it back to C/C++ source code is nearly impossible for all practical purposes. Even if possible by some experts there would be no way it would include your original source comments nor the names you used for variables and functions you created in the sketch.


It is nearly imposable.
The sketch was compiled into asm then compiled to binary.
The binary could be downloaded via avrdude and disassembled but it would still only be in ASM, not C++.