Say I have an I2C EEPROM... Now, obviously I'm going to want to read and write strings, not just arrays of bytes.
I see that I2C.writeTo() is described as accepting a string - so that handles the writing part.
How do I go the other direction?
I2C.readFrom() returns an array of bytes - and you can't eval() an array of bytes - is there any way other than looping through each byte and looking up what character it should be?
(I know the whole I2C EEPROM bit is kinda silly, since we have the microSD card slot... but they're so dirt cheap, I couldn't resist ordering one)
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Say I have an I2C EEPROM... Now, obviously I'm going to want to read and write strings, not just arrays of bytes.
I see that I2C.writeTo() is described as accepting a string - so that handles the writing part.
How do I go the other direction?
I2C.readFrom() returns an array of bytes - and you can't eval() an array of bytes - is there any way other than looping through each byte and looking up what character it should be?
(I know the whole I2C EEPROM bit is kinda silly, since we have the microSD card slot... but they're so dirt cheap, I couldn't resist ordering one)