SPI

SPI on the micro:bit is supported in the micro:bit runtime through the ARM mbed SPI class. However, by design, this is this is not initialised by default as part of the uBit object.

The reasons for this are:

Note

We may wrap SPI in the future and attach it to the MicroBit class to provide lazy initialisation of the SPI module.

In the meantime we recommend you instantiate your own instance of SPI, using the mbed SPI class:

SPI spi(MOSI, MISO, SCK);