I’m a beginner to arduino programming. I’m trying to develop home automation project using node mcu board based with blynk. I’m trying to memorize commands on the EEPROM.This is my code. please help to modify it
@Prabhath1 please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```
You haven’t posted the code correctly, because you didn’t follow the instructions you were given when you crated the topic. I’ve asked you to fix that, and your code will be deleted if it isn’t fixed.
I’d suggest that you try again, and this time have one set of triple backticks at the beginning of your code, and another at the end, rather than what you’ve currently done.
Okay, EEPROM is old technology and will damage the memory of your device if used incorrectly.
It was replaced by SPIFFS, which in turn has been replaced by LittleFS.
However, it depends what you are trying to achieve. In most situations the data you want to save can be written to a Blynk virtual pin and retrieved at startup using a Blynk.syncVirtual command.
The only scenario where that isn’t appropriate is if you want your device to function using manual inputs even if the connection to the Blynk server is down. However, your code won’t work in that scenario anyway, as you’ve used Blynk.begin which is a blocking command so the code execution won’t progress beyond that line of code if a connection to Blynk is unavailable.