This is fun project using PI-PCIO and air quality sensor (SDC40) as a tiny home air quality station with a display!
Example:
Normal | Night mode |
---|---|
- Connects to the wifi and updates the timing info from the ntp server.
- Connect to SDC40 Sensor for CO2 via I2C, get Temp and Humidity and CO2 level
- Display Information on 2-inch Color display (ST7789) via spi.
- Date and time and Counter.
- RPI-PICO W (to connect to wifi and update the time)
- SDC40 Air Quality sensor
- ST7789 Display
ST7789 | RPI-PICO | SDC4x | RP-PICO | |
---|---|---|---|---|
BLK | GP15 | SDA | GP24 | |
DC | GP20 | SCL | GP25 | |
RESET | GP21 | VCC | 3.3Vout | |
CSN | GP17 | GND | GND | |
SDA | GP19 | |||
SCL | GP18 | |||
VCC | 3.3Vout | |||
GND | GND |
to build the binary:
cd pico-sdk
git submodule update --init
cd ..
To get the time data from ntp server a wifi connection is required. To define the wifi ssid and password, either define env variables WIFI_SSID
and WIFI_PASSWORD
or just define inline with cmake command:
WIFI_SSID="TEST" WIFI_PASSWORD="pass" cmake -DPICO_BOARD=pico_w
then make a build folder and build via cmake:
mkdir build
cd build
cmake -DPICO_BOARD=pico_w -DPICO_SDK_PATH=./pico/pico-sdk ..
now you can build either with cmake --build .
or make all -j