Monitoring CO2 levels, and temperature with an ESP8266 D1 Mini microcontroller and a Sensirion SCD40 CO2 sensor.
To be connected to a time-series database like InfluxDB...
...or used to manually probe data via the serial monitor...
Sensirion SCD40 -> Sensirion_SCD4x_Datasheet.pdf
Platform IO for VSCode. Follow their guide to get started.
This is setup to use InfluxDB. First, set up an InfluxDB instance on a server following the guide.
Project secrets are stored in ./src/secrets.h
. There is an example secrets file ./src/secrets.example.h
.
This contains:
- InfluxDB secrets (URL, organisationm access token, bucket)
- WiFi secrets (SSID, password)
- Select correct board (D1 Mini) with Platform IO.
- Build & upload with Platform IO
- Connect to COM Port with serial monitor
Live-plot example data: use PuTTY
to create a log file (putty.log
), and use bash's watch
to plot the data, e.g., using gnuplot/eplot - see guide.