Ghostbird / Arduino_EEPROM_RW

Sketch turns Arduino Serial into interactive command line interface for reading and writing T24C02A I²C EEPROM it has partial support for T24C04A, T24C08A and T24C16A EEPROMS
9 stars 3 forks source link

Unable to change the address, once you set it the first time. #1

Closed beargun closed 7 years ago

beargun commented 7 years ago

Once setting the I2C address, using the S option has no effect.

Steps to reproduce

This is because typing S will call the EEPROM_I2C_setAddress(); function, which will return the new address. However, nothing is done with the returned value.

Fix: Change line 213 from EEPROM_I2C_setAddress(); to I2C_ADDRESS = EEPROM_I2C_setAddress();

PS, thanks for the awesome tool. Though it took me quite some time to figure out this problem, as I though it was an hardware issue, instead of the software I was using to read (-:

Ghostbird commented 7 years ago

Fix has been merged. Thanks for the heads up. Note that I do not have a test set-up available, so I'd be much obliged if you could verify the correctness of the fix. (I made a few extra, mainly cosmetic, changes.)

beargun commented 7 years ago

Everything is working perfectly. I have verified it with a 2kbit EEPROM and my logic analyzer.

Thanks for the fast fix.