Due to the China National Holiday, we will be on holiday from Oct 1st to 8th. We will process your order on the Oct 9th.

Raspberry Pi and Qwiic SHT31 sensor Demo

Posted by AlexChu, 11/12/2019

This is a demo to show you how to make raspberry Pi board work with Qwiic module (SHT31 temperature and humidity sensor).

Prepare hardwares:

Step 1 Setup the Raspberry Pi

Check out this super quick video on how to setup the Raspberry Pi.


Step 2 Connect

Connect the Zio development board with SHT31 Temperature & Humidity Sensor to the Raspberry Pi via the ZIO QWIIC HAT.


Step 3 enable the I2C bus
Either from the Raspberry Pi’s desktop or via SSH, Open the terminal and type in:
sudo raspi-config and press enter.


Using your keyboards arrow keys, select ‘5 Interfacing Options’ and press enter.

Scroll down to ‘P5 I2C’ and press enter.


Then select ‘<Yes>’ and press enter to enable the I2C interface for the ZIO QWIIC ecosystem.

Select ‘<Ok>’ and ‘<Finish>’ to return to the terminal.


Step 3 Download python script
Whilst still in the terminal type:
sudo git clone https://github.com/machineshopuk/SHT31

This will generate a folder called SHT31, enter it by typing:
cd SHT31


Then run the script by typing:
python SHT31.py

The script will output temperature and humidity values to the terminal.


Leave a Comment