Skip to content

v0.3.0 — 1-Wire/DS18B20 hardening + refocused examples

Choose a tag to compare

@hsteinhaus hsteinhaus released this 12 Jun 16:20
· 268 commits to master since this release
6b016c3

Vendors and hardens the 1-Wire / DS18B20 driver, and replaces the monolithic kitchen-sink examples with focused per-topic bins plus an LVGL example. Breaking: the DS18B20 driver and module are renamed.

Highlights

  • driver::onewire — async 1-Wire bus master over the RMT peripheral, vendored in-tree (drops the external esp-hal-rmt-onewire git dependency that blocked publishing and lagged esp-hal). Public API: OneWire, Address, Search, crc8; new search-masks feature gates the masked ROM search.
  • DS18B20 correctness — reads now wait for Convert T to complete (no stale 85 °C power-up value), read and CRC-8-validate the full 9-byte scratchpad, and CRC-check ROM addresses during enumeration. A CRC-bad or dropped sensor is warned and omitted (its address stays cached and is retried) instead of aborting the read.
  • DS18B20 performance — enumerate the bus once and cache ROM addresses (no hot-plug assumed); subsequent reads address each sensor by Match ROM rather than re-running the full ROM search every cycle. Adds Ds18b20Driver::rescan().
  • Examples refocused — the kitchen-sink main.rs/ble.rs demos are split into focused per-topic bins (display, i2c_scan, m5go, wifi_sta, coex) for both boards behind a shared examples/common crate, plus a new oxivgl (LVGL) display example.

Breaking

  • driver::ds16b20driver::ds18b20; Ds16b20DriverDs18b20Driver (the sensor is the DS18B20; "16" was a typo).
  • Address is now driver::onewire::Address; its Display/LowerHex render byte-wise, family-code first and zero-padded. onewire::Error, SearchError, and ds18b20::Error are reworked onto thiserror_no_std with #[from] sources.

Hardware-verified

  • Fire27 (ESP32): 2× DS18B20 on Port B / G26 read correctly across cycles; a bus disconnect degrades gracefully — per-sensor warn + omit, addresses retained, no hang or crash.
  • oxivgl example renders on Fire27.

Notes

  • First crates.io release. The library now depends on stock crates.io esp-hal 1.1.0 / esp-radio 0.18.0 (no git deps), so it can be consumed directly (m5stack-core = "0.3.0"); verified to build against stock deps in isolation. Local and example builds are redirected to the emobotics esp-hal fork (ESP32 SPI/DMA patches the examples need) via a rev-pinned [patch.crates-io], which cargo publish ignores.

See CHANGELOG.md, #22, #24 and #26.