• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Why not UPDATE in ESP EEPROM code like in AVR code.

Q&A Forum › Category: ESP32 › Why not UPDATE in ESP EEPROM code like in AVR code.
0 Vote Up Vote Down
AdaBill asked 6 years ago

The uno type EEPROM library has an “Update” call that will only update the location if the new number is different than the current number in memory. With limited writes to flash memory, this seems like a great idea! If we do any volume of writes to EEPROM it seems like we should also do this test first before we just write to EEPROM.

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 6 years ago

Hi William.

The EEPROM library works differently with the Arduino and with the ESP32.

I wrote the tutorial about the ESP32 EEPROM a long time ago. But for what I remember, the update() function, didn’t work with the ESP32.

Also, with the ESP32, after calling the write() function, you need to call the commit() function. In this case, it will just commit the changes, if you’re writing something different on the EEPROM (just like the update() function).

So, you don’t need to worry about reading before writing.
(I don’t know if this is different now, someone correct me if I’m wrong.)

Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.