https://github.com/mguida22/environment-sensor
https://github.com/mguida22/environment-sensor
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mguida22/environment-sensor
- Owner: mguida22
- Created: 2025-03-26T22:44:52.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-26T22:47:48.000Z (3 months ago)
- Last Synced: 2025-03-26T23:30:47.587Z (3 months ago)
- Language: C++
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
![]()
# M5 Atom Matrix + BME688
Read environment data (temperature, humidity, pressure, altitude and gas resistance) using a M5 Atom Matrix wired up to a BME688 sensor.
An optional Rust server will log MCAP data files and stream it to [Foxglove](https://foxglove.dev/) using the [Foxglove Rust SDK](https://docs.foxglove.dev/docs/sdk/introduction).
## Setup
### Wiring
Connect the sensor to your controller. I'm using a Seengreat BME688 sensor and wired the following pins together.
| Seengreat BME688 | M5 Atom |
| ---------------- | ------------- |
| VCC | 5V |
| GND | GND |
| SLC/SCK | G21 |
| SDA/MOSI | G25 |
| MISO/ADDR | not connected |
| CS | not connected |
References:
- https://seengreat.com/wiki/162/bme680-environmental-sensor-bme688-environmental-sensor#toc14
- https://docs.m5stack.com/en/core/ATOM%20Matrix### Controller
Follow https://docs.m5stack.com/en/arduino/arduino_ide to get setup with Arduino and the M5 Atom Matrix.
You'll likely need to install the Adafruit BME680 and M5Stack libraries, along with their dependencies.
## Running
Select your device in the Arduino IDE and upload the code. Open the Serial Monitor and set the baud rate to 115200. You should see sensor readings.
```
{"temperature":19.37,"humidity":38.15,"pressure":900.16,"altitude":985.17,"gas_resistance":135.63}
```These have the following units:
- Temperature: °C
- Humidity: %
- Pressure: hPa
- Altitude: m
- Gas Resistance: kΩ## ESP32 Logger
If enabled in the `atom-environment-sensor` Arduino code, data will be sent over UDP to the rust server.
This will stream data to [Foxglove](https://foxglove.dev/) via a websocket connection, and write logs to MCAP files which can also be viewed in Foxglove.
```
cd esp32_logger
cargo run
```