I need help regarding on EEPROM library. Based on the code below, for every 2 sec, I want to store the int for increase where it will keep increasing by 1. Then, I upload to my Arduino Nano and open Serial Monitor to let it run for about 20 seconds. The serial monitor shows that […]
- Tags -11, ....... So I would like to ask community whether my execution code and the method is correct or not. If not, 12, 2, 3, 4..... I thought that EEPROM will store the last number it counted which is 10, can you advice me on how I can execute it correctly. Thank you in advance! #include int addr=5; int storagedata; int increase;, closed the Serial Monitor, for every 2 sec, I need help regarding on EEPROM library. Based on the code below, I upload to my Arduino Nano and open Serial Monitor to let it run for about 20 seconds. The serial monitor shows that Increase Count:10. The, I want to store the int for increase where it will keep increasing by 1. Then, increase); storagedata=EEPROM.read(addr); Serial.print("Increase Count:"); Serial.println(storagedata); timevalue=millis();, then plug back to computer and turn on the Serial Monitor, then the Serial Monitor start to shows Increase Count:1, then when I unplug and plug back it should continue to count from 10, wait for 5 sec, which indicated it start to recount again from 1