← index #2093PR #549
Related · high · value 0.827
QUERY · ISSUE

RFC: Sensor driver interface

openby pfalconopened 2016-05-21updated 2025-10-01
rfc

As one of the latest KS stretch goals, we need to implement suite of drivers for number of sensors, and it would be nice to come up with a general sensor driver model to follow.

Requirements:

  1. A general, baseline interface (userstory: "I have a hundred of sensors, how do I use them in similar manner of any MicroPython port", not: "My project is centered around capabilities of a particular sensor, how do I expose them?")
  2. The general requirement is avoiding memory allocations to perform sensor reading
  3. One of the biggest contention points is usage of floating-point vs fixed points numbers, and if the latter, then how. Given that floating-point support is optional, and may lead to memory allocation, would be strongly nice to support (allocation-free) fixed point.
  4. Should be general enough for any sensor (including sensors which measure several values).
  5. There should be balance between efficiency tricks and pythonic ease of use.
CANDIDATE · PULL REQUEST

micropython/drivers: Add "sht3x" sensor driver.

closedby wemosopened 2022-10-13updated 2022-11-07

Add "sht3x" sensor driver.

2 comments
jimmo · 2022-11-07

@wemos Thanks for implementing the SC7A20 driver too, but could you please add this in a different PR?

We're keen to merge this PR, but please address the review comments first.

wemos · 2022-11-07

ok

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied