File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
libraries/CurieEEPROM/examples/eeprom_write Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ void setup() {
2222 for (int i = 0 ; i < EEPROM.length ()/8 ; i++)
2323 {
2424 unsigned long val = analogRead (0 );
25- addr +=4 ; // increment address by 4 since we are using DWORDs
2625 Serial.print (" Addr:\t " );
2726 Serial.print (addr);
2827 Serial.print (" \t Writing: " );
2928 Serial.println (val);
3029 EEPROM.write (addr, val);
30+ addr +=4 ; // increment address by 4 since we are using DWORDs
3131 delay (100 );
3232 }
3333
@@ -36,12 +36,12 @@ void setup() {
3636 for (int i = EEPROM.length ()/2 ; i < EEPROM.length (); i++)
3737 {
3838 byte val8 = analogRead (0 )/4 ;
39- addr++;
4039 Serial.print (" Addr:\t " );
4140 Serial.print (addr);
4241 Serial.print (" \t Writing: " );
4342 Serial.println (val8);
4443 EEPROM.write (addr, val8);
44+ addr++;
4545 delay (100 );
4646 }
4747
You can’t perform that action at this time.
0 commit comments