# sensors Turns raw `drivers` readings into typed sensor values (e.g. debounced contact state, calibrated analog readings). Knows values, not hardware. `REQUIRES drivers`. Common interface: `include/sensor.h` defines `Sensor` and `SensorValue`, deliberately modeled on Zephyr's sensor API: - **fetch()/get() split**: `fetch()` triggers one hardware read and caches it; `get(channel, out)` pulls a single channel out of that cache. Multi-channel sensors (e.g. BME280: temperature + humidity + pressure) pay the hardware cost once per `fetch()`, not once per channel. - **Fixed-point `SensorValue`**: `val1 + val2 * 1e-6`, no `float`/`double`. ESP32-C6 has no hardware FPU, so this avoids software-emulated floating point on every sample. - **Fine-grained `SensorChannel`** enum (`AmbientTemperature`, `Humidity`, `AccelX`, ...), mirroring Zephyr's `SENSOR_CHAN_*` granularity. `supports(channel)` lets `profiles` discover capabilities generically. - **`set_trigger()`** for interrupt-driven sensors (data-ready pin, threshold, reed switch edge), so wake-on-event is possible instead of pure polling -- matters for the battery-first sleep/wake philosophy in `AGENTS.md`. Defaults to unsupported; polling-only sensors don't override it. Every concrete sensor (reed switch, DS18B20, BME280, ...) implements `Sensor`, so `profiles` and `lua_runtime` can consume any of them uniformly.