This guide will show you how to use Jupyter Notebook with the MCP2221(A) to connect I2C sensors from your desktop PC running Windows, macOS or Linux. You can use any CircuitPython library for any of our I2C sensors to stream data into your computer's USB port.

We've written three interactive Jupyter Notebooks for three different types of sensors - a temperature sensor, an accelerometer and a thermal camera. All of these notebooks have animated graphs so you can see data streaming into your computer in real-time.

This guide is also compatible with the Adafruit FT232H breakout. You'll need to make a small adjustment to the code. See the Jupyter Notebook Examples page for more information.

MCP2221

Our MCP2221A breakout board allows your computer to talk to sensors or devices that use I2C or analog/digital GPIO. 

There's no firmware to deal with, so you don't have to deal with how to "send data to and from an Arduino which is then sent to and from" an electronic sensor or display or part.

This board is plug & play compatible with with all of our Stemma QT/Qwiic connector sensors with no soldering required

CircuitPython Libraries on your Computer

In this guide we will not be using the actual CircuitPython firmware. But we will be installing and using CircuitPython Libraries on your Computer. This allows us to interface with a growing collection of 200+ libraries and drivers.

Jupyter Notebook

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. 

You'll use Jupyter to create interactive notebooks containing live code which interfaces with your MCP2221 and sensors. 

Parts

Adafruit MCP2221A Breakout - General Purpose USB to GPIO ADC I2C

PRODUCT ID: 4471
Wouldn't it be cool to drive a tiny OLED display, read a
$6.50
IN STOCK

Adafruit PCT2075 Temperature Sensor - STEMMA QT / Qwiic

PRODUCT ID: 4369
The Adafruit PCT2075 Temperature Sensor is a 'code compatible' drop in replacement for a very...
$4.95
IN STOCK

Adafruit LSM6DSOX 6 DoF Accelerometer and Gyroscope

PRODUCT ID: 4438
Behold, the ST LSM6DSOX: The latest in a long line of  quality Accelerometer+Gyroscope 6-DOF IMUs from ST.This IMU sensor has 6 degrees of freedom - 3 degrees each of...
$11.95
IN STOCK

Adafruit MLX90640 24x32 IR Thermal Camera Breakout

PRODUCT ID: 4469
You can now add affordable heat-vision to your project and with an Adafruit MLX90640 Thermal Camera Breakout. This sensor contains a 24x32 array of IR thermal sensors. When connected...
OUT OF STOCK

Materials

The MCP2221A has a USB-C connector, make sure you pick up the correct cable or adapter for your computer.  

1 x USB C to USB C Cable, 1 meter
USB C to USB C Cable - USB 3.1 Gen 4 with E-Mark - 1 meter long
1 x Micro B USB to USB C Adapter
Micro B USB to USB C Adapter

The sensors we selected for this guide can be used with a STEMMA QT cable so you can plug-and-play with the MCP2221's STEMMA QT port. 

1 x STEMMA QT Cable, 50mm
STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long
1 x STEMMA QT Cable, 100mm
STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long
1 x STEMMA QT Cable, 200mm
STEMMA QT / Qwiic JST SH 4-Pin Cable - 200mm Long
1 x STEMMA QT to Male Headers Cable, 150mm
STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable - 150mm Long
This guide was first published on Dec 24, 2019. It was last updated on Dec 24, 2019. This page (Overview) was last updated on Mar 30, 2020.