An iOS/macOS app to read Sensirion SCD-41 CO2 sensor readings written in SwiftUI.
- ESP32-C3
- Lipo charger
- SCD-41
- Qwiic cable
- JST 2-pin cable
- Nokia BP-6MT 3.7V battery
- (optional) Solder the Lipo charger to the ESP32-C3
- (optional) Connect the battery to the Lipo charger via the JST 2-pin cable
- Connect the SCD-41 to the ESP32-C3 via the Qwicc cable
- Plug the ESP32-C3 into your laptop and upload the Arduino sketch here: co2_sensor_scd4x_esp32_http_server
- Arduino ESP32-C3 BLE and HTTP exporter
- Clone this repo, open in Xcode, tap run
- The app will auto-detect the CO2 sensor and show live data
- Tap the
Save
button to save the current reading shown - Tap the
History
button to show the readings since the sensor was turned on - Tap the
Sound
button to play two notes when a sensor reading happens - it first plays middle C corresponding to 1,000 ppm CO2, and then a second note corresponding to the current sensor reading - Tap the
Archive
button to see a list of readings saved to Core Data
By pressing the Save
button, the current reading is saved to your device's Core Data. If you have iCloud setup, the data will sync across your devices.
If you'd like to export your data to a cloud InfluxDB account:
- Sign up for an InfluxDB account: https://cloud2.influxdata.com/signup
- Copy your
OrganisationID
,BucketID
, and generate anAPIKey
- Tap the
i
button on the home screen of the app and fill in your details
Here's some sample data in a dashboard in InfluxDB:
- Download historic data
- Read realtime data
- Add location data to saved sensor readings
- Add ability to run on macOS
- Save settings to user defaults
- Export to InfluxDB
- Add iOS 16 Chart for last 10 readings (tutorial)
- Add macOS menu item