This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sensirion SCD30 | |
https://www.mouser.co.uk/ProductDetail/Sensirion/SCD30?qs=rrS6PyfT74fdywu4FxpYjQ%3D%3D | |
Raspberry Pi Pico (U1) | |
https://www.raspberrypi.org/products/raspberry-pi-pico/ | |
0.96 OLED SSD1306 (U2) | |
https://www.amazon.co.uk/SSD1306-Self-Luminous-Display-Compatible-Raspberry-Blue-Yellow/dp/B08FD643VZ/ | |
(other versions are available - make sure the pins are in the order: GND, VCC, SCL, SDA when viewed from the screen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires the following micropython libraries - install these to the Pi Pico with Thonny | |
# errno, ffilib, os, scd30, signal, ssd1306, stat | |
# Rename this file to "main.py" and save to the Pico so that it runs automatically on power on. | |
import time | |
import math | |
from machine import Pin, I2C | |
from machine import WDT | |
from scd30 import SCD30 | |
from ssd1306 import SSD1306_I2C |