Read and Display Environment Sensor Data Using Raspberry Pi Pico and CircuitPython

Read and Display Environment Sensor Data Using Raspberry Pi Pico and CircuitPython

Introduction

In this tutorial, we will try to read sensor data from M5Stack Environment Sensor Unit II and display it to the OLED Grove module using I2C communication. The advantage of using I2C is we can use a single bus (SDA, SCL) to communicate with multiple devices with different addresses. However, for this tutorial we would like to test on different I2C ports for sensors and display.

Video

This video shows how to read environment sensor data and display it to OLED using Maker Pi Pico and CircuitPython.

Hardware Preparation

This is the list of items used in the video.

Sample Program

This is CircuitPython sample program to read environment sensor data and display it to OLED through I2C communication using Maker Pi Pico and CircuitPython. Please include those CircuitPython libraries in the Raspberry Pi Pico CIRCUITPY drive.

  • adafruit_bus_device
  • adafruit_display_text
  • adafruit_bmp280.mpy
  • adafruit_displayio_ssd1306.mpy
  • adafruit_sht31d.mpy

Thank You

References:

Thanks for reading this tutorial. If you have any technical inquiries, please post at Cytron Technical Forum.

"Please be reminded, this tutorial is prepared for you to try and learn.
You are encouraged to improve the code for a better application."