Way to recover sketches?

I made a sketch a few months ago, saved it, and uploaded it. But then I had to tweak it to make it functional, and I didn't save the tweak. It's been so long I can't for the life of me remember what I did.

Is there a way to download the current sketch off of a board back into the IDE?

No, because the sketch never got loaded to the board, only the object code after compilation

No. The best that could be done would be to download the binary executable file but that is not the source code for the sketch and cannot be loaded into the IDE

So there's no hope of turning the binary back into a editable sketch?

It would be easier to recreate the code by rewriting the tweak.

great, Ive got no clue what that was.
well time to scour YouTube for that obscure tutorial i found last year

Sure, but you would have to go through the object code to figure it out. Few people have the knowledge and patience required though. There's probably a tool that will do it for you, but even then, all the variable and function names will be machine generated gibberish.

Not automatically. If you were experienced enough with AVR machine code then you could disassemble it and maybe you could create a sketch that did exactly the same as the binary, but it would not be the original sketch and you would not be asking this question

Okay, I'm very new to this and have completely forgotten what my code means lol thanks for y'alls help

github is a way to archive code, saving past versions

Do you not have backups of your files? The sketch was saved on disk before it was compiled and uploaded to the Arduino.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.