Comments on: Arduino EEPROM Explained – Remember Last LED State https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sun, 14 May 2023 20:52:18 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Jim https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-834746 Sun, 14 May 2023 20:52:18 +0000 http://randomnerdtutorials.com/?p=42267#comment-834746 In reply to Sara Santos.

If it changes state every 10 seconds, as stated, the update() function will update the EEPROM as Duncan has stated. This is a very example to present for the use of the EEPROM.

]]>
By: Wilberforce https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-822293 Wed, 01 Mar 2023 13:02:42 +0000 http://randomnerdtutorials.com/?p=42267#comment-822293 Nice project, interested in the output status maintaining a HIGH or LOW pin, trying to link up with this project on the input button status but still not getting it.

]]>
By: Ankit https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-766670 Mon, 04 Jul 2022 06:39:59 +0000 http://randomnerdtutorials.com/?p=42267#comment-766670 Can you please write this programming in micro C language.

]]>
By: Dave X https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-717333 Thu, 06 Jan 2022 14:37:50 +0000 http://randomnerdtutorials.com/?p=42267#comment-717333 You should consider adding the EEPROM.put() and EEPROM.get() functions: https://www.arduino.cc/en/Reference/EEPROMPut and https://www.arduino.cc/en/Reference/EEPROMGet and maybe the undocumented EEPROM.end().

One way you could use them to store a richer configuration that protects against EEPROM that exceeded its write count by storing a structure with a flag pointing to the valid and confirmed data.

Or simpler, you could store the EEPROM address of the valid data in EEPROM, and update to a different address if it ever fails to update & check properly. E.g: stateAddress=EEPROM.Read(EEPROM.end()); ledState=EEPROM.Read(stateAddress);

]]>
By: Mario Yusta Cayuelas https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-679004 Wed, 06 Oct 2021 04:36:24 +0000 http://randomnerdtutorials.com/?p=42267#comment-679004 In reply to Jet.

Jet, could you guide me, to write what you explain, I am a novice user, if you want I will send you my email, thank you, in advance!
mario172 at msn.com

]]>
By: Jet https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-633539 Mon, 21 Jun 2021 22:59:21 +0000 http://randomnerdtutorials.com/?p=42267#comment-633539 In reply to Muhammad Jeeh.

It doesn’t work that way . At around 100,000 cycles the memory you have used will stop functioning So if you change Address 0 100,000 times it will stop changing . but address 1 should still change,

]]>
By: Jet https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-633538 Mon, 21 Jun 2021 22:54:56 +0000 http://randomnerdtutorials.com/?p=42267#comment-633538 In reply to Ray.

It is what it is. alternative would be a replaceable external EEPROM

]]>
By: Jet https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-633537 Mon, 21 Jun 2021 22:52:57 +0000 http://randomnerdtutorials.com/?p=42267#comment-633537 In reply to Sara Santos.

That would at least double the life of the eeprom.

]]>
By: Jet https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-633535 Mon, 21 Jun 2021 22:49:54 +0000 http://randomnerdtutorials.com/?p=42267#comment-633535 In reply to Duncan Amos.

set all eeprom to FF then you save at address = address +1 . When you reset the program looks for the first FF then sets the address 1 less and reads the Led. Then after next button press save at address = address +1. With a Nano you now get 11000+ days – around 30 + years.

]]>
By: Muhammad Jeeh https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/#comment-528681 Sun, 13 Dec 2020 16:37:48 +0000 http://randomnerdtutorials.com/?p=42267#comment-528681 Hi Sarah. How can i erase the EEPROM ? I want to erase it periodically to avoid exceeding the 100,000 write cycles.

]]>