SPI - Read and Write Data


  • AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / BW16-TypeC ] x 1
  • Arduino UNO x 1


SPI is a fast and robust communication protocol that are commonly found on many microcontrollers and is often used to retrieve sensor data or output image signal to a display.


Then copy and paste the following code line by line into REPL to see their effects.

from machine import SPI
spi = SPI(1)          # Only support 2 sets of SPI -- 0 and 1, for connection please refer to the table below
spi.write(bytes([123]))     # Write number 123 
Please confirm that QQ communication software is installed