Adafruit_Wippersnapper_Arduino icon indicating copy to clipboard operation
Adafruit_Wippersnapper_Arduino copied to clipboard

Refactor other sensors to use fastTicks / internal poll period

Open tyeth opened this issue 5 months ago • 1 comments

Since #811 is merged, the base driver should probably be extended to support an internal poll period, and the time calc done there, with a view to v2. Mainly the other air sensors that need similar functionality should be refactored.

In v2 there should also be the facility for a 0 internal poll period, effectively facilitating on_change for i2c. There would ideally be some controllable hysteresis options for users (ADCs etc) although basic digital inputs will be a massive initial win. Ideally there would be extra pins possible on i2c components (like an interrupt pin) which could instead trigger readings so the Quadrature encoders over SeeSaw (i2c) would not require constant polling (would be fine initially if they did).

tyeth avatar Oct 01 '25 16:10 tyeth

Some sensors to consider if they are not already on your list:

| Sensor   | Measured Quantities           | Polling Period |
|----------|-------------------------------|----------------|
| MCP9808  | Temperature                   | ~1 Hz          |
| BME280   | Temp, Pressure, Humidity      | ~1 Hz          |
| BME680   | Temp, Pressure, Humidity, Gas | ~1 Hz          |
| DS2484   | 1-Wire adapter (varies)       | —              |
| ENS160   | VOC, eCO₂                     | ~1 Hz          |
| SCD30    | CO₂, Temp, Humidity           | ~2 s           |
| SCD4x    | CO₂, Temp, Humidity           | 1–5 s          |
| SEN5x    | PM, VOC, NOx, Humidity        | ~1 Hz          |
| PMSA003I | PM1.0, PM2.5, PM10            | ~1 Hz          |
| BME688   | Temp, Pressure, Humidity, Gas | ~1 Hz          |

mikeysklar avatar Oct 01 '25 19:10 mikeysklar