Forgetfulino 2.0: 💾 Stop Losing Your Arduino Code! Meet Forgetfulino 2.0 (LIBRARY + EXTENSIONS ) Save Your Code in the Board - Retreave It Later
by IamTheVector in Circuits > Arduino
90 Views, 0 Favorites, 0 Comments
Forgetfulino 2.0: 💾 Stop Losing Your Arduino Code! Meet Forgetfulino 2.0 (LIBRARY + EXTENSIONS ) Save Your Code in the Board - Retreave It Later
If you work with Arduino long enough, eventually this happens.
Your board is running perfectly.
The project works exactly as expected.
But the original .ino files are gone.
Maybe they were on another laptop.
Maybe the project folder was accidentally deleted.
Maybe someone modified the code, uploaded it, and closed the Arduino IDE without saving.
Now the board runs the correct code, but the source you have is outdated or missing.
Forgetfulino solves exactly this problem.
Forgetfulino is an Arduino library and Arduino IDE extension that embeds your sketch source code directly into the firmware so it can be recovered later via Serial.
So to retreave the code you have to upload the library first, Forgetfulino CANNOT RECOVER the code from machine code of old boards!
Once installed, every upload can become a self-contained backup of your sketch.
In this guide you will learn how to:
- embed your sketch source code inside firmware
- upload it to the board
- recover the original code later
Supplies
Hardware
- Arduino board (Uno, Nano, Mega, ESP32 or compatible)
- USB cable for the board
Software
- Arduino IDE 2.x
- Forgetfulino Arduino library
- Forgetfulino Arduino IDE extension
Optional
- A sketch already uploaded to the board (to demonstrate recovery)
Install the Forgetfulino Library
Download the library from GitHub:
https://github.com/IamTheVector/Forgetfulino
Extract the repository.
Copy the Forgetfulino folder into your Arduino libraries directory.
Typical locations:
Windows
macOS
Linux
After copying the folder, restart the Arduino IDE.
The library should now appear in:
Install the Arduino IDE Extension
Forgetfulino includes an Arduino IDE extension that automates the workflow.
The extension source project is hosted in the same repository on a subfolder.
Download the compiled .vsix extension package and install it in Arduino IDE 2.x.
Steps:
- Close Arduino IDE
- Locate the .arduinoIDE configuration folder
Windows
macOS
Linux
- Create the folder
- Copy the .vsix file into that folder
Restart Arduino IDE.
The extension will now be active and will allow you to generate headers and decode dumps automatically.
Check deployedPlugins folder to verify if the plugin has been installed (Remember only IDE 2.x)
(If you want to explore the extension build please follow this other git that is not useful for
Prepare Your Sketch
Create or open your Arduino sketch.
Normally at this point a tutorial would say something like:
“Add the library manually to your sketch.”
Something like this:
But… come on. Manually? Really?
No way.
Forgetfulino includes an Arduino IDE extension that can inject everything automatically.
Follow the gif!
Upload and Recover the Source Code
Upload the sketch to your Arduino board as usual.
The firmware now contains a copy of the source code inside flash memory.
If you open the serial you will find a string like this
Open the Serial Monitor. Copy the compressed string, right click on the string and click decompress. Follow the gif, follow your code!
Why This Is Useful
Forgetfulino is useful in situations like:
• the original project folder is lost
• a different version of the sketch was saved.
• the sketch was modified and uploaded without saving
• the board still works but the source is missing
In those cases the firmware itself becomes the source of truth.
Other Features You Can Explore
In this guide we only covered the basic workflow:
embed the sketch → upload → recover it.
Forgetfulino includes several additional features that make it more flexible in real projects.
Here is a quick overview.
On-demand dump
Instead of printing the sketch every time the board starts, Forgetfulino can wait for a trigger word sent through the Serial Monitor.
When the word is received, the library dumps the source code.
Example trigger:
Useful when you want a clean Serial output but still keep recovery available.
Password-protected trigger
You can define your own trigger string.
Example:
Now the dump will only happen when that exact word is received on Serial.
Useful for deployed devices or controlled access.
Compressed source storage
The sketch can be stored using deflate compression + Base64 encoding.
This significantly reduces flash usage and allows the entire sketch to be printed as a compact single line.
Include or remove comments in the dump
The IDE extension lets you enable or disable comments in the stored source.
• With comments enabled → the recovered code is easier to read.
• With comments disabled → the stored source becomes smaller and more compact.
This can be useful on boards with limited flash memory.
Plain text dump
Forgetfulino can also print the source code as readable text.
Useful when you simply want to copy the code directly from the Serial Monitor.
Arduino IDE extension
The IDE extension automates the workflow.
It can:
- generate embedded headers
- decode compressed dumps
- inject Forgetfulino templates into sketches
- regenerate headers automatically when the sketch changes
Auto-inject template
For brand-new sketches, the extension can automatically insert the Forgetfulino setup code.
This ensures the library is always initialized correctly without manual setup.
Library version annotation
When recovering a sketch, the extension can automatically add comments showing the version of each included library.
Example:
This helps reconstruct the exact original build environment.
If you want to see all these features demonstrated step by step, you can watch the full video here:
Important Note
Forgetfulino does not replace version control systems like Git.
You should still use proper versioning for your projects.
Forgetfulino is meant as a last-resort recovery mechanism when the board is the only reliable artifact left.