mirror of
https://github.com/sascha-hemi/pycom-documentation.git
synced 2026-03-21 05:06:35 +01:00
add docs for new sensor API
This commit is contained in:
@@ -17,7 +17,11 @@ Creates a LTR329ALS01 object. Constructor must be passed a Pycoproc or I2C objec
|
||||
|
||||
### LTR329ALS01.light()
|
||||
|
||||
Read the light levels of both light sensors. Returns a tuple with two values for light levels in lux: `(blue, red)`, between 0-65535.
|
||||
Read the light levels of both light sensors. Returns a tuple with two values for light levels: `(blue, red)`, between 0-65535.
|
||||
|
||||
### LTR329ALS01.lux()
|
||||
|
||||
Calculate the illuminance using the readings of the light sensor. Returns a single value in lux.
|
||||
|
||||
## Constants
|
||||
|
||||
|
||||
@@ -22,4 +22,16 @@ Read the external temperature of the sensor. Returns a float with the temperatur
|
||||
|
||||
### SI7006A20.dew_point()
|
||||
|
||||
Calculates the dew point temperature for the current temperature and humidity measurement.
|
||||
Calculates the dew point temperature for the current temperature and humidity measurement.
|
||||
|
||||
### SI7006A20.heater_control(state)
|
||||
|
||||
Enable or disable the internal heating element by setting state to `True` or `False` respectively. The internal heating element can be used to remove any condensation from the temperature sensor in order to get more accurate readings. Note that this will increase the temperature readings. By default, the heater is disabled.
|
||||
|
||||
### SI7006A20.read_heater_reg()
|
||||
|
||||
Read the current setting of the internal heater. This will return a value between 0 and 15, where 0 corresponds with 3.09 mA and 15 with 94.20 mA. All values in between scale linearly
|
||||
|
||||
### SI7006A20.write_heater_reg(heater_value)
|
||||
|
||||
Write the current setting of the internal heater. Use a value between 0 and 15, where 0 corresponds with 3.09 mA and 15 with 94.20 mA.
|
||||
Reference in New Issue
Block a user