From 5da9792cd61b5ba9eed9fb80874edb52081d6232 Mon Sep 17 00:00:00 2001 From: Chris--A Date: Tue, 24 Mar 2015 13:58:01 +1000 Subject: Fixed EEPROM examples and added readme --- libraries/EEPROM/examples/eeprom_read/eeprom_read.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libraries/EEPROM/examples/eeprom_read/eeprom_read.ino') diff --git a/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino b/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino index 8567ed7..68c4ffc 100644 --- a/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino +++ b/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino @@ -42,15 +42,15 @@ void loop() Rather than hard-coding the length, you should use the pre-provided length function. This will make your code portable to all AVR processors. ***/ - addr = addr + 1; - if(addr == EEPROM.length()) - addr = 0; + address = address + 1; + if(address == EEPROM.length()) + address = 0; /*** As the EEPROM sizes are powers of two, wrapping (preventing overflow) of an EEPROM address is also doable by a bitwise and of the length - 1. - ++addr &= EEPROM.length() - 1; + ++address &= EEPROM.length() - 1; ***/ delay(500); -- cgit v1.2.3-18-g5258