This PlatformIO repository contains the code for the sensor board that belongs with CO2 display esp32 and is useless on its own.
The hardware part consist of a esp32 with a sht31 temperature/humidity sensor plus a SenseAir S8 CO2 sensor.
You can use any esp32 to run this app. Configured compile targets are esp32-s2 and esp32-c3.
- Clone this repository.
git clone https://github.com/CelliesProjects/SensorHub.git
- Open the install folder in PlatformIO and add a
wifiSecrets.h
file to thesrc
folder with the following content:
#ifndef _WIFI_SECRET_
#define _WIFI_SECRET_
#define SSID "wifi network"
#define PSK "wifi password"
#endif
- In
platformio.ini
adjustNTP_POOL
to your countries iso code andTIMEZONE
to your local time zone. - Build and upload the firmware to the esp32.
The sensorHub will now be found automagically by the CO2 display.
This app will also run on a ancient plain esp32 with the psram issue as it only uses normal ram.
All sensor reading, averaging and history keeping are done on this board and pushed to the client over websocket.
The reason the sensors are on a separate board are the power requirements of the CO2 sensor which uses 300mA for some milliseconds every measurement. This caused the tft display to flicker. This issue was solved by putting the sensors on a separate board.
MIT License
Copyright (c) 2024 Cellie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.