Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 3.97 KB

README.md

File metadata and controls

64 lines (44 loc) · 3.97 KB

A Bluetooth CO2 monitor app for iOS/macOS

An iOS/macOS app to read Sensirion SCD-41 CO2 sensor readings written in SwiftUI.

Hardware

Assembly

  • (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

Software

  • 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

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 an APIKey
  • 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:

TODO

  • 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