Skip to content

CelliesProjects/co2-display-esp32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CO2 display esp32

Codacy Badge

SAM_3242

This is a PlatformIO project designed to display CO2 levels using a Panel ESP32-4848S040.
It reads data from a Senseair S8 CO2 sensor and an SHT31 temperature and humidity sensor, displaying the real-time readings and the history of the last 2 hours.

Sensors are on separate sensor board and are retrieved over websocket.
This setup is chosen because the SenseAir S8 CO2 sensor uses up to 300mA when reading and this makes the tft screen flicker during reading.
You can find the sensor code at the SensorHub repo.

There is also weather forecast data shown which is retrieved from visualcrossing.com.
You will need to setup an account with visualcrossing to be able to download weather data but registration and 1000 free API credits per day are included in the free accounts.
You can setup your free account here.

Installation

Assuming you already have the SensorHub running and a visualcrossing account API key you can use these steps to install:

  1. Clone this repository.
git clone https://github.com/CelliesProjects/co2-display-esp32.git
  1. Open the extracted folder in PlatformIO and add a secrets.h file to the include folder with the following content:
#ifndef SECRETS
#define SECRETS

const char *WIFI_SSID = "network";
const char *WIFI_PSK = "password";

const char *VISUAL_CROSSING_CITY = "city";
const char *VISUAL_CROSSING_COUNTRY = "country";
const char *VISUAL_CROSSING_API_KEY = "your api key";

#endif
  1. Build and upload the firmware to the ESP32.

Done!

If all went well the board will now search for the sensorhub and connect automagically.

License

This project is licensed under the MIT License.