aboutsummaryrefslogtreecommitdiff
path: root/libraries/EEPROM/examples/eeprom_read
diff options
context:
space:
mode:
authorChris--A <chris@genx.biz>2015-03-24 13:58:01 +1000
committerChris--A <chris@genx.biz>2015-03-24 13:58:01 +1000
commit5da9792cd61b5ba9eed9fb80874edb52081d6232 (patch)
tree13ea73606522e092346c2b9c84020870e8efae72 /libraries/EEPROM/examples/eeprom_read
parent26577474efcb8874dad687467a8ba2f01678ff4c (diff)
Fixed EEPROM examples and added readme
Diffstat (limited to 'libraries/EEPROM/examples/eeprom_read')
-rw-r--r--libraries/EEPROM/examples/eeprom_read/eeprom_read.ino8
1 files changed, 4 insertions, 4 deletions
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);