Bases: object
Ambient Light Sensor. Class functions for the APDS9300 ambient light sensor.
Returns LUX output from the raw sensor data.
Parameters: |
|
---|---|
Returns: | Lux Float value of light intensity |
Read a byte value from a register.
Parameters: | reg – Register address |
---|---|
Returns: | Register byte content |
Read raw data from channel 0 or channel 1
Parameters: | channel – Value of 0 or 1. |
---|---|
Returns: | data - Channel data as raw number. |
Read a word value from a register.
Parameters: | reg – Register address |
---|---|
Returns: | Register word content |
Set the gain of the internal photodiode sensors, can be 1x or 16x.
Parameters: | gain – Gain type can be GAIN_1 or GAIN_16 for gain of 1 or 16x |
---|---|
Returns: | none |
Set the high level data threshold for the interrupt.
Parameters: | highvalue – High interrupt threshold value |
---|---|
Returns: | none |
Set the low level data threshold for the interrupt.
Parameters: | lowvalue – Low interrupt threshold value |
---|---|
Returns: | none |
Enable or disable the interrupts on the sensor.
Parameters: | enable – Enables or diable interrupt. Default is False. |
---|---|
Returns: | none |
Configure the sampling time of the sensor.
Parameters: | sampling_time – Can be 0x00,0x01,0x02 |
---|---|
Returns: | none |
Configures the power state of the chip.
Parameters: | state – Denotes the power state of the sensor ,set to 0/1 to turn off/on. |
---|---|
Returns: | none |
Write a byte value. Assumes the register pointer is predefined.
Parameters: | data – Data byte to write on the I2C bus |
---|---|
Returns: | none |