The examples in this guide are no longer supported and may not work. We are only supporting CircuitPython on our boards. For more information about using CircuitPython, check out the CircuitPython Essentials: https://learn.adafruit.com/circuitpython-essentials/circuitpython-essentials
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:

This guide was first published on Sep 09, 2016. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Mar 08, 2024.

Text editor powered by tinymce.