From 710e1d1fb1177c0acea179c6aec59ad6c8a555ec Mon Sep 17 00:00:00 2001 From: rob tillaart Date: Thu, 29 Jul 2021 18:00:41 +0200 Subject: [PATCH] fix bug in example --- examples/I2C_eeprom_format/I2C_eeprom_format.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/I2C_eeprom_format/I2C_eeprom_format.ino b/examples/I2C_eeprom_format/I2C_eeprom_format.ino index 5086a95..a2e3a57 100644 --- a/examples/I2C_eeprom_format/I2C_eeprom_format.ino +++ b/examples/I2C_eeprom_format/I2C_eeprom_format.ino @@ -59,10 +59,10 @@ void setup() if ( ans == 'Y') { start = millis(); - for (uint32_t i = 0; i < size; i += 128) + for (uint32_t address = 0; address < size; address += 128) { - if (i % 1024 == 0) Serial.print('.'); - ee.setBlock(0, 0xFF, 128); + if (address % 1024 == 0) Serial.print('.'); + ee.setBlock(address, 0xFF, 128); } diff = millis() - start; Serial.print("\nTIME: ");