Datasheet
CircuitPython Code
It's easy to use the SHT31-D sensor with CircuitPython and the Adafruit CircuitPython SHT31D module. This module
allows you to easily write Python code that reads the humidity and temperature from the sensor.
First wire up a SHT31-D to your board exactly as shown on the previous pages for Arduino using an I2C connection.
Here's an example of wiring a Feather M0 to the sensor with I2C:
Board 3V to sensor VIN
Board GND to sensor GND
Board SCL to sensor SCL
Board SDA to sensor SDA
Next you'll need to install the Adafruit CircuitPython SHT31D library on your CircuitPython board.
First make sure you are running the latest version of Adafruit CircuitPython for your board.
Next you'll need to install the necessary libraries to use the hardware--carefully follow the steps to find and install these
libraries from Adafruit's CircuitPython library bundle. Our introduction guide has a great page on how to install the
library bundle for both express and non-express boards.
Remember for non-express boards like the, you'll need to manually install the necessary libraries from the bundle:
adafruit_sht31d.mpy
adafruit_bus_device
You can also download the adafruit_sht31d.mpy from its releases page on Github.
Before continuing make sure your board's lib folder or root filesystem has
the adafruit_sht31d.mpy, and adafruit_bus_device files and folders copied over.
© Adafruit Industries https://learn.adafruit.com/adafruit-sht31-d-temperature-and-humidity-sensor-breakout Page 15 of 20










