I am trying to store data in ATmega328 (Arduino Uno) using the following code using tinkercad:
#include <EEPROM.h>
void setup() {
int addr, data=1;
Serial.begin(9600);
for (addr=0; addr<1023; addr++) {
EEPROM.write(addr, data);
}
for (addr=0; addr<1023 ; addr++) {
Serial.print(EEPROM.read(addr), DEC);
}
}
When I simulate the code in the tinkercad, then i get the following error:
In function `main':
43: undefined reference to `loop'
error: ld returned 1 exit status
Please help me where is the error in my code. I am not able to understand the error source.