SPI on the micro:bit is supported in the micro:bit runtime through the ARM mbed
However, by design, this is this is not initialised by default as part of the uBit object.
The reasons for this are:
- SPI requires the dedicated use of three GPIO pins. Committing these pins would prevent them from being used as general purpose I/O
- The SPI module also requires a small amount of additional memory to operate, and this is not necessary for the majority of applications
We may wrap SPI in the future and attach it to the
to provide lazy initialisation of the SPI module.
In the meantime we recommend you instantiate your own instance of
SPI, using the mbed
SPI spi(MOSI, MISO, SCK);