I2C.readFrom() returns an array of bytes returned by the device - however, it is returned as a simple array, so each member of the array takes up two memory units.
This is particularly relevant for interfacing with an EEPROM (I was testing the module, when I discovered this). Reading in 512 bytes took up 1025 memory units... the corresponding Uint8Array takes up 35 memory units.
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.
I2C.readFrom() returns an array of bytes returned by the device - however, it is returned as a simple array, so each member of the array takes up two memory units.
This is particularly relevant for interfacing with an EEPROM (I was testing the module, when I discovered this). Reading in 512 bytes took up 1025 memory units... the corresponding Uint8Array takes up 35 memory units.