Open Koepel opened 3 years ago
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 👍
Thanks @greenveg! What project are you working on?
Using a Controllino (Arduino framework PLC) for test rig at work. Need power-off recovery and such…
(This comment is mostly a "bump" - but I also just used a few votes on it!)
Note: additional discussion in #399
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.
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.
How can I store EEPROM contents in browser local storage?
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.
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.