Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EEPROM persistence #231

Open
Koepel opened this issue Nov 18, 2021 · 9 comments
Open

EEPROM persistence #231

Koepel opened this issue Nov 18, 2021 · 9 comments
Labels
enhancement New feature or request open for vote Vote at https://wokwi.com/features

Comments

@Koepel
Copy link

Koepel commented Nov 18, 2021

Feature request: store the internal EEPROM somewhere to make its data persistent.

My request is a for the internal EEPROM of the AVR family boards. When returning to Wokwi next day, the previous written data should still be there.

No extras
There are many additions that I can think of (download the contents; have a number of binary files which can be choosen or uploaded; also store the simulated EEPROM of the SAMD and ESP processors; and so on), but that it too much over the top.

Writing to EEPROM has no clock-accurate delay. It is slower on a old ATmega8 then on a newer microcontroller. This might have consequences for interrupts. Since this is a very specific situation, I don't mind if the delay for writing data is skipped.

Storage location
It would be nice if the data was stored on the Wokwi server in the project and not on the user's computer. That allows to use an other computer and continue with the same data.

@Koepel Koepel added the enhancement New feature or request label Nov 18, 2021
@urish urish added the open for vote Vote at https://wokwi.com/features label Nov 18, 2021
@greenveg
Copy link

greenveg commented Dec 8, 2021

I too need better EEPROM functionality.
I mostly need start/stop functionality to behave as power off as I'm trying to write good power-loss recovery stuff.

Gave it 4 votes 👍

@urish
Copy link
Contributor

urish commented Dec 12, 2021

Thanks @greenveg! What project are you working on?

@greenveg
Copy link

Using a Controllino (Arduino framework PLC) for test rig at work. Need power-off recovery and such…

@M-square
Copy link

M-square commented Jun 3, 2022

(This comment is mostly a "bump" - but I also just used a few votes on it!)

@urish
Copy link
Contributor

urish commented Oct 23, 2022

Note: additional discussion in #399

@ppvnf
Copy link

ppvnf commented May 10, 2023

newbie here, for my school project IRL I am using highScore = EEPROM.read(0);, however in the emulator I have to use EEPROM.get(0, highScore);, otherwise I will get 255 as the high score. And in the real hardware I have to use highScore = EEPROM.read(0); in order not to get 255. Another workaround I found is running in void setup EEPROM.write(0, 0); so that the emulator highScore starts with 0 using the same code I use in the real Arduino.

@Koepel
Copy link
Author

Koepel commented May 10, 2023

When you buy a new ATmega328P microcontroller (as used in the Arduino Uno), then the EEPROM is empty. A empty EEPROM means that all the data is 0xFF. Wokwi simulates a fresh new unused Arduino Uno and therefor the EEPROM is empty and is 0xFF.
The Arduino Uno board that you have in real life has probably been used by others.

@jumpjack
Copy link

How can I store EEPROM contents in browser local storage?

@Koepel
Copy link
Author

Koepel commented Mar 24, 2024

That is not implemented yet. The EEPROM contents is not stored in the Wokwi project as a file yet and it is not stored on your computer as local browser data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request open for vote Vote at https://wokwi.com/features
Projects
None yet
Development

No branches or pull requests

6 participants