D1 mini PRO. I used the example. I did a bit of reading on how it works and wrote a dozen boolean and byte variables to the EEPROM. Writing and reading was correct. I tested for 2 days. I decided that everything was working correctly. I wrote mainly the byte variables with a value of 100.
I set the EEPROM size to 512 and increased the usage to 380. This I did at home.
At work I checked and corrected the code a dozen times also resetting the board. I saved some space in the eeprom with a variable byte of value 99. Everything wrote and read correctly.
At home I connected the board to the PC, fired up the Arduino IDE, did a readout and all the values I had at work saved as 99 read as 100.
What is it, I thought? I ran a piece of code writing the EEPROM with a byte count of 99. Each time the readout gave 100. I changed the value being written to 0. Also 100. Finally, I did the write three times without doing the readout. After the third time, all the fields that were supposed to be zeros turned out to be numbers 99.
Well... if the EEPROM.commit() was missing I would still understand, but this action of the eeprom completely deprives me of the possibility of a logical explanation.
.
Above are snippets of code to enable the relay. I am operating on time, so the numbers 99 indicate empty eeprom cells.
Below is a function that should produce 0, and the numbers 99 appear.
.
So what can you make of this?
I set the EEPROM size to 512 and increased the usage to 380. This I did at home.
At work I checked and corrected the code a dozen times also resetting the board. I saved some space in the eeprom with a variable byte of value 99. Everything wrote and read correctly.
At home I connected the board to the PC, fired up the Arduino IDE, did a readout and all the values I had at work saved as 99 read as 100.
What is it, I thought? I ran a piece of code writing the EEPROM with a byte count of 99. Each time the readout gave 100. I changed the value being written to 0. Also 100. Finally, I did the write three times without doing the readout. After the third time, all the fields that were supposed to be zeros turned out to be numbers 99.
Well... if the EEPROM.commit() was missing I would still understand, but this action of the eeprom completely deprives me of the possibility of a logical explanation.
Code: C / C++
Above are snippets of code to enable the relay. I am operating on time, so the numbers 99 indicate empty eeprom cells.
Below is a function that should produce 0, and the numbers 99 appear.
Code: C / C++
So what can you make of this?