Note this guide was written for MicroPython.org firmware and not Adafruit CircuitPython firmware.

Serial peripheral interface, or SPI, is a protocol for two devices to send and receive data.  For example a LCD display might use a SPI interface to receive pixel data, or a temperature sensor might use SPI to send readings to a microcontroller.  With MicroPython you can use the SPI protocol to talk to devices and write scripts that interface with interesting hardware!

This guide will explore how to use SPI with MicroPython.  In particular MicroPython on the ESP8266 will be used to talk to a simple SPI device, the MAX31855 thermocouple temperature sensor.  You'll learn how to create a SPI interface, and send and receive data over that interface.  With just the basics of sending and receiving SPI data you can start to write your own MicroPython code that interacts with other interesting SPI devices!

Before you get started you'll want to be familiar with the basics of using MicroPython by reading these guides:

Last updated on 2017-01-27 at 05.37.24 AM Published on 2016-09-09 at 12.09.14 PM