You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ bq = BQ27441(i2c)
84
84
85
85
# Reading battery information
86
86
bq.state_of_charge() # State of charge in %
87
-
bq.voltage() # Voltage in mV
87
+
bq.voltage_mv() # Voltage in mV
88
88
bq.current_average() # Average current discharge in mA
89
89
bq.capacity_full() # Full capacity in mAh
90
90
bq.capacity_remaining() # Remaining capacity in mAh
@@ -250,7 +250,7 @@ i2c = machine.I2C(1)
250
250
apds = APDS9960(i2c)
251
251
252
252
apds.enable_light_sensor()
253
-
light = apds.read_ambient_light()
253
+
light = apds.ambient_light()
254
254
255
255
```
256
256
@@ -327,7 +327,7 @@ i2c = machine.I2C(1)
327
327
pads = WSEN_PADS(i2c)
328
328
329
329
# Reading values
330
-
pressure = pads.pressure() # Pressure in hPa
330
+
pressure = pads.pressure_hpa() # Pressure in hPa
331
331
temperature = pads.temperature() # Temperature in °C
332
332
```
333
333
@@ -476,6 +476,7 @@ lib/<component>/
476
476
-**Reset methods**: `reset()` for hardware reset (pin toggle), `soft_reset()` for software reset (register write), `reboot()` for memory reboot (reload trimming).
477
477
-**Power methods**: `power_on()` / `power_off()`. All drivers must implement both.
478
478
-**Status methods**: `_status()` returns the raw status register as an int (private), `data_ready()` returns True when all channels have new data, `<measurement>_ready()` for per-channel readiness (e.g. `temperature_ready()`, `pressure_ready()`).
479
+
-**Measurement methods**: bare noun without unit suffix only for `temperature()` (°C) and `humidity()` (%RH). All others include the unit: `pressure_hpa()`, `distance_mm()`, `voltage_mv()`, `acceleration_g()`, etc. `read()` for combined reading returning a tuple, `<measurement>_raw()` for raw register values.
0 commit comments