Questions tagged [eeprom]

Electronically Erasable ROM is a type of memory available on most boards. It is used for storing persistent data. Use the tag for questions about the EEPROM library or the hardware.

Filter by
Sorted by
Tagged with
51
votes
8answers
80k views

Is using malloc() and free() a really bad idea on Arduino?

The use of malloc() and free() seems pretty rare in the Arduino world. It is used in pure AVR C much more often, but still with caution. Is it a really bad idea to use malloc() and free() with ...
21
votes
5answers
26k views

What is the real lifetime of EEPROM?

ATMEL says the cell lifetime of an EEPROM cell is about 100,000 write cycle/ cell. Is this actually how the EEPROM performs in the wild? If I do not change the value of a cell, does this stress the ...
10
votes
5answers
54k views

How to read and write EEPROM in ESP8266

I need to know how I can write integer values in EEPROM and retain the value on power on. char *Red = strstr(myTestUrl, "/R"); if (Red) { int RedValue = atoi(Red + 2); analogWrite(12, RedValue); ...
8
votes
5answers
4k views

How is stack memory used for fuctions and local variables?

I wanted to save some values to the EEPROM and also wanted to free up SRAM by avoiding some variable declarations, but EEPROM memory is byte wise. If I want to store an int value, I have to use some ...
7
votes
3answers
1k views

How to increase life of EEPROM?

I want to store a few (8 as of now) IR codes into my Board's EEPROM. It would be great if someone could suggest a few tips to maximize the lifetime. The IR codes in my sketch are saved in array of ...
7
votes
5answers
28k views

How to remember variable values after rebooting an Arduino Uno R3 board?

Is there any way to store the values of necessary variables somewhere (may be in a file that gets updated by the program at various events), which can be read back when program starts after rebooting ...
6
votes
2answers
5k views

Is it possible to run a binary from EEPROM?

Say I wrote a compiled sketch to EEPROM then read it. Could I run the program from EEPROM? I guess the question is: Can an Arduino run software not in flash memory in the middle of executing the ...
5
votes
2answers
1k views

Run code once after programming

I'm using EEPROM to store project settings non-volatile. After reuploading the sketch to my board (over SPI via ArduinoISP), the EEPROM is reset to full 0xFFs and I have to manually do a "software ...
5
votes
3answers
14k views

Can you access the EEPROM of an ATtiny with Arduino Code?

I'm attempting to reduce the amount of RAM being used by my program by writing some values to the EEPROM of my micro controller. I'm currently programming on the ATtiny85 which has 512 Bytes of EEPROM....
5
votes
1answer
1k views

EEPROM value reverting to 255

When I write '13' to the EEPROM and read it straight after it works correctly. However when I comment out the write part of the code and try to just read the data, the value is no longer 13 as it ...
4
votes
2answers
1k views

EEPROM bytes preset to 255 while programming

I'm working on a program with Arduino Uno which involves writing and reading EEPROM. I'm using a basic EEPROM library. My problem is: EEPROM values are preset to 255 whenever I burn my program. And ...
4
votes
3answers
6k views

Possible to store variables directly in EEPROM?

Is it possible to store a variable directly in EEPROM and retrieve it without needing to use a library? I'm building a project that can change the colour of an RGB LED and I want to store the colour ...
4
votes
3answers
2k views

Set EEPROM from PC before program

I have been working on an arduino program, which has gotten rather large. I am close to hitting the 32k limit on Flash for my ATmega328p. I would like lower my program size by saving some of my many ...
4
votes
2answers
139 views

Is EEPROM persisted across program flashes?

If I use EEPROM.write(someAddr, someValue) to write a value to an address, how long will that value "stick" to that address before being lost? If I were to power down the Arduino, flash a whole new ...
4
votes
1answer
732 views

Trying to understand bitbanging, shiftIn(), reading EEPROM

Alright, so I have an Atmel 93C66, http://www.atmel.com/Images/doc0172Z.pdf Datasheet and I'm wanting to read whatever is in it. I copied the following code from this thread http://forum.arduino.cc/...
3
votes
2answers
4k views

What is the best way to get more RAM for a sound buffer?

The problem: How to extend the memory for a sound buffer (intensively used) if: SD card library supports only one file open at a time (and I have one open already) EEPROM chips are able to stand ...
3
votes
1answer
6k views

How can configuration values be stored on an ESP8266?

I have a project that uses an MQTT service, and I'm wondering how to best store the configuration settings (server, user, password, port) for the service as right now they are just hard-coded into ...
3
votes
1answer
443 views

EEPROM size limitation issue

I am creating a test program with Arduino Nano where I can save network and password. Here is my code to start with: void SaveNetwork(String ssid, String pass){ String com = ssid + "~" + pass; ...
3
votes
2answers
5k views

How to read/write variables persistenly on Arduino Due (no EEPROM/shield)?

I am relatively new to Arduino and I am currently writing some code to control a relay board. The on/off times are provided by the user at run-time and should be stored persistently (EEPROM or flash) ...
3
votes
1answer
83 views

Best way of storing extra data for Arduino project

I am an arduino beginner and I am trying to make a speed camera alert system, it would start beeping if I am above the speed limit and getting close to the speed camera. There is this website where I ...
3
votes
4answers
1k views

Is it possible to save different values on address 0 and 1 in EEPROM?

I want to save different values on address 0 and 1 on eeprom I tried to change it but when I put data on address 0 and also put data on address 1 the address 0 change its value stored into random ...
3
votes
3answers
6k views

Using Arduino as Keylogger

Is it possible to use arduino uno r3 as USB keylogger by connecting the usb male pin to CPU and keybord cable to female USB pin of arduino. So that the keystrokes are stored in EEPROM. Without using ...
2
votes
2answers
296 views

EEPROM.get returns bad data

I am using the attached code. What I am trying to do is: Test if there is a personalized "board serial number" written in the EEPROM (by previous code run) If data found was not 7 characters (e.g SN-...
2
votes
3answers
1k views

Is it possible to use extra AVR Flash memory as non-volatile EEPROM-like Flash memory storage?

In STM32 microcontrollers it is possible to use a technique that ST calls IAP, or In-Application Programming, in order to write to the Flash memory from your running application. They even have a nice ...
2
votes
3answers
4k views

How to write data in RAM memory using Arduino Uno or Arduino Due?

I know that it is possible to write data in ROM(Read Only Memory). But what about if I want to write data in RAM(Random Access Memory)? Can I do it using "Arduino Uno R3"? RAM is normally associated ...
2
votes
2answers
305 views

Write faster on AT24C32

I'm using AT24C32 EEPROM chip from ATmel. I found code that will write and read bytes from chip. Code writes and reads bytes correctly and without any problem. But I have to write few 8-byte values ...
2
votes
2answers
5k views

How to save a float variable to the eeprom

This is my first post here and I'm hoping there are some arduino hobbyists here to help me. Does anyone here know how to save a float variable directly to the eeprom? If so could have a look at the ...
2
votes
3answers
9k views

Arduino digitalWrite 1 or 0 instead of HIGH or LOW

Is it ok to use digitalWrite(pin, 1) instead of digitalWrite(pin, HIGH) or digitalWrite(pin, 0) instead of digitalWrite(pin, LOW) I want it that way to make the coding lesser because I save ...
2
votes
4answers
2k views

Storing a counter to EEPROM - how to extend the life?

I am building a circuit that has a button, which when pressed, should increment a counter. I want to store this counter so that when I power off my circuit, it can be read when I power it back on. ...
2
votes
1answer
96 views

Inherent delay running EEPROM.read()

I'm using EEPROM to store long term data for use in sketches (thanks to DarthRubik for the guidance). I store stuff like a location ("Garden") and a device name ("Greenhouse Monitor 02") plus ...
2
votes
1answer
47 views

Is it possible to execute a code in runtime when gets updated over the air (OTA)?

I would like to build a lib like ArduinoOTA but with no downtime at runtime. To achieve that I am wondering if it is possible to create a simple setup and loop code to Check for new releases If we ...
2
votes
1answer
388 views

Writing data to a specific address in EEPROM

I'm trying to write two strings to an Arduino Uno's EEPROM. Here, the first code block works fine: it writes string(True/False) at 'address 0'. But the second block, which writes data at 'address 5', ...
2
votes
1answer
7k views

String to persistent memory (EEPROM?)

I am creating a server node that I want to be able to save the wifi SSID and the password into persistent memory so that when it starts ups it can connect to the network. I have looked for several ...
2
votes
1answer
1k views

Arduino EEPROM retains old data after flashing with a new program

I have a custom 5V 16Mhz Arduino Uno (a breadboard Uno of sorts) that runs the grbl firmware. After the initial flashing I can see all the settings (through the serial monitor) and everything works. ...
2
votes
1answer
104 views

EEPROM library throwing errors

I've included in my sketch and am trying to run a simple sketch that just does EEPROM.write(0,4); followed by a println of EEPROM.read(0); However, it won't compile. It keeps telling me there is an ...
2
votes
2answers
3k views

Update variable using buttons

I made a part of code to change the temperature limit for alarm system. On warm days user have to change the temperature limit with buttons and OLED display. The question is: How can the variable ...
2
votes
1answer
293 views

Overwritten EEPROM

I have a problem with the Teensy, its EEPROM and another Array. My program contains two Arrays, the first one is a 128x4 long Array, the other one a 2560x2 double Array. The first Array is meant to ...
2
votes
1answer
38 views

EEPROM: managing address mapping between firmware versions

Is there a common way to handle changes in the mapping between eeprom addresses and variables between firmware versions? It's not about the eeprom memory to survive the update, but to be(come) ...
2
votes
3answers
814 views

Value of uninitialized EEPROM in ESP8266?

In my limited testing it appears that the EEPROM in the Wemos D1 is not initialized to 255 like the specs say is the case for AtMega based Arduinos. In fact, the values look to be more-or-less random. ...
2
votes
1answer
970 views

Saving EEPROM after programming on Arduino uno

I am using an Arduino Uno, and I use the EEPROM to store some presets. It works fine. But, when I reprogram the Arduino, the EEPROM gets wiped out. Is there a way to prevent this, and have the EEPROM ...
1
vote
4answers
1k views

How do you write to a free location on an external EEPROM?

I want to log GPS positions to an external EEPROM over I2C. For example: Latitude: 51.0000 Longitude: 4.0000 If I remove the decimal place then each of these addresses would consume up to two bytes ...
1
vote
3answers
386 views

Which EEPROM has a long lifecycle?

I would like to build a box counter for machine, so I'm going to use EEPROM in Arduino to save count. But the lifecycle is limited to 100,000 writes. Please suggest an external EEPROM with a long ...
1
vote
4answers
2k views

Read float and long from external EEPROM chip

I am using an Arduino to read information from an EEPROM chip over I2C with the code I found here: https://playground.arduino.cc/Code/I2CEEPROM It works great for int and char values but I also need ...
1
vote
3answers
196 views

Spiffs vs Eeprom on esp8266

In my project, i have some data to save permanently. After some research i got many examples and informations to do that with eeprom. I used it effectively. After all i decide to deep dive to esp8266 ...
1
vote
2answers
91 views

Store value in EEPROM to perform different actions on reset?

I want the same button to wake up (reset) and put it to sleep but this is hard if the button is tied directly to the rst pin. My thought was to read and store a value in EEPROM so tell the chip what ...
1
vote
4answers
13k views

EEPROM put and get not working on ESP8266 (NodeMCU)

The Arduino documentation provides two examples to store data in the EEPROM. https://www.arduino.cc/en/Reference/EEPROMPut stores data in the EEPROM and the EEPROMGet example reads the data back and ...
1
vote
1answer
554 views

EEPROM - Storing Static Data

I'm trying to store four items to EEPROM. I can do one item no problem, I just don't know how to make the jump to multiple items. My code: #include <EEPROM.h> char sgrpID[31] = "acpilot's ...
1
vote
1answer
2k views

Most efficient way to store number in EEPROM?

I would like to store temperature readings in eeprom, the value from -55.00 to 125.99. What is the most space efficient way to store these numbers with two significant digits along with epoch ...
1
vote
2answers
479 views

How to manage variable I2C read lengths requiring address incrementation (Wire/I2C/EEPROM IC emulation)

The question is about how to have information/control of a variable length read for an Arduino acting as a slave device. The concrete context is that I want to emulate an EEPROM IC. A byte write to ...
1
vote
2answers
373 views

Save Data before Shutdown

I am building a positioner and I store the current position to EEPROM when the move is complete. On start up, I want the positioner to return to the HOME position. I am running an UNO powered from the ...