EEprom

I am currently storing some configuration structs to eeprom.
Everything working great writing and/or reading back.

But my structure is fairly big and I noticed I eventually made it to big and I couldn't readback the end of the struct data. No error reading/writing but the config struct last data was not there.

So I then checked the size with EEPROM.length. I am getting 256 back.
My struct length was in the range of 250~. So I think I was hitting the end.

I reduced some char[] sizes to get back to where I wasn't causing problems.

I see some Uno docs that say 512b and i think i even saw 1Kb.

So just wondering if the 256 is my actual available eeprom memory.

Just trying to make sure i understand my limits.

Thanks

jmw_arduino:
I see some Uno docs that say 512b

That's incorrect. Would you mind posting a link to those so I can try to get them fixed?

jmw_arduino:
i think i even saw 1Kb.

This is the correct number for the ATmega328P microcontroller used on the Arduino Uno.

jmw_arduino:
So just wondering if the 256 is my actual available eeprom memory.

That is correct. You need to understand that although Arduino Uno WiFi Rev2 has "Uno" in the name, there are some significant differences from the Arduino Uno. The Arduino Uno WiFi Rev2 uses the ATmega4809 microcontroller instead of the ATmega328P used on the Uno. Although the ATmega4809 generally has superior specs compared to the ATmega328P, it has less EEPROM memory.

Thanks for the quick reply and explanation.

I was probably generalizing about documentation on the EEPROM and was really looking at UNO not UNO WiFi Rev2 documentation.

So i was probably the one making the bad assumption.

Just got my first Arduino product two weeks ago so just learning differences, etc.

Ill try and keep all my stored config data under the 256. If i start adding more features, etc and have the need for more, ill look into some external EEPROM solutions.

Im building a mist system for doing plant cuttings.

In the process of determing number of valves/relays i want to control. At the moment going with 4.

The trying to determine if i have only one program foreach or multiples. each program has start and stop times, cycle/duty times, etc. Plus allowing some char arrays for program name and valve names. So the data structure go fairly big.

I got the WiFi just to learn, and having a regular Uno coming for playing/testing so i might move the final version to Uno only. Just depends how much i decide to use the WiFi portion for AP phone hookup config/status, NTP time calls, web config/status hookup.

Also going to add in some sensors once i test a few. temp/humidity, rain, daylight, etc.

Plus love to use a local HMI with say a Nextion Display.

So with all that, i might go ahead and look at using the Uno Wifi at a closer location and communicate to another local Arduino Uno for the local sensors and relay protion.

Basically have a HMI/COMM Uno Wifi inside my house and then a Uno Only out in the greenhouse where i dont think i have WiFi anyway.

Thanks again!

You're welcome. I'm glad if I was able to be of assistance. It sounds like a great project. Enjoy!
Per