From fd4323f360885725c736c90745ee57dbca20e8a0 Mon Sep 17 00:00:00 2001 From: Chris--A Date: Thu, 19 Mar 2015 17:13:32 +1000 Subject: Small tweaks to EEPROM lib and examples. --- libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino') diff --git a/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino b/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino index 34071fc..a2d825c 100644 --- a/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino +++ b/libraries/EEPROM/examples/eeprom_iteration/eeprom_iteration.ino @@ -42,14 +42,14 @@ void setup() { Iterate the EEPROM using a do-while loop. ***/ - int idx = 0; + int idx = 0; //Used 'idx' to avoid name conflict with 'index' above. do{ //Add one to each cell in the EEPROM - EEPROM[ index ] += 1; - index++; - }while( index < EEPROM.length() ); + EEPROM[ idx ] += 1; + idx++; + }while( idx < EEPROM.length() ); /*** Iterate the EEPROM using a C++11 ranged for loop. -- cgit v1.2.3-18-g5258