Skip to main content, numberOfBytes)

Copies data from the SPI flash and returns it as a series of bytes




Name Type Description
address Integer The address from which to copy the data
numberOfBytes Integer The number of bytes to copy


Blob — the bytes read from the SPI flash


This method reads the number of bytes specified, starting at the given address, and writes them into a new blob object which it creates and returns after the read is complete.

Contrast this method with spiflash.readintoblob() which performs the same task but writes the bytes read from the SPI flash into an existing blob passed as a parameter.

Example Code

Read 36 bytes from SPI flash starting from address 3 * 1024.