So having commited a deadly sin (not backing-up my work) I have had to replace an old computer.
I have several Arduino projects , one of which I did not save the Sketch for.
Is there a way of reading the sketch from the Arduino?
The moral of the story is - always back-up your work!
Thanks for reinvigorating my interest in physical computing.
Short answer, nope. At best you can read the hex file but that's machine code. It's okay to clone it to another Arduino but for editing not so much... (Unless you want to start writing in ASM...)
“Is there a way of reading the sketch from the Arduino?”
No, the best you can do is pull the compiled code from it.
You can try a de-assembler on it, example:
but you won’t end up with anything like a sketch that you can edit in the IDE.
Try it on a .hex file from your new computer and see what you get.
And then run a C++ decompiler on it. Google “avr c++ decompiler”.
But you won’t be getting something like a sketch out of it.