Self-made altitude sensor: ESP32-C3 SuperMini + BMP280 broadcasting pressure and temperature over standard BLE Environmental Sensing. Read into baldav the same way as the heart-rate strap (Kotlin BLE service -> file -> Rust -> JS), new device_type 'baro'. - BleHrService: 'baro' type subscribes to ESS 0x181A (pressure 0x2A6D uint32 0.1 Pa, temperature 0x2A6E int16 0.01 C), writes ble_baro_data.json + ble_baro_log.jsonl. Every baro branch is gated by deviceType=='baro', so HR/GPS paths are untouched. - ble.rs: BaroReading, ESS detection, ble_get_baro command (Android reads the file, desktop returns None). Registered in lib.rs. - frontend/js/baro.js: passive window.BARO - hypsometric pressure->altitude using the sensor temperature, anchored to GPS altitude at ride start. Nothing runs until BARO.start(), so with no barometer the app is unchanged. - tools/baro-sensor: firmware (PlatformIO main.cpp + Arduino sketch) that reads BMP280 at max oversampling and advertises the ESS service. Prep only: no hardware yet, verified by compile (build 0.1.538). Live wiring and ride-track integration pending the board.
20 lines
792 B
INI
20 lines
792 B
INI
; BalDav BLE barometer - ESP32-C3 SuperMini + BMP280
|
|
; Build & flash over USB, no Arduino IDE:
|
|
; pip install platformio (once)
|
|
; pio run -t upload (compile + flash via USB-C)
|
|
; pio device monitor (optional: see logs)
|
|
; ESP32-C3 flashes over its native USB. If upload can't find the port the first time:
|
|
; hold BOOT (GPIO9), tap RESET, release BOOT -> it enters download mode, then retry upload.
|
|
|
|
[env:esp32-c3-supermini]
|
|
platform = espressif32
|
|
board = esp32-c3-devkitm-1
|
|
framework = arduino
|
|
monitor_speed = 115200
|
|
; native USB-CDC so the board enumerates as a serial port over its own USB-C
|
|
build_flags =
|
|
-D ARDUINO_USB_MODE=1
|
|
-D ARDUINO_USB_CDC_ON_BOOT=1
|
|
lib_deps =
|
|
adafruit/Adafruit BMP280 Library @ ^2.6.8
|
|
h2zero/NimBLE-Arduino @ ^1.4.1
|