![]() |
qwiic_as7343_py
1.0.0-3-g4a2798e
Python for SFE qwiic as7343 py
|
Public Member Functions | |
| def | __init__ (self, address=None, i2c_driver=None) |
| Constructor. More... | |
| def | is_connected (self) |
| Determines if this device is connected. More... | |
| def | begin (self) |
| Initializes this device with default parameters. More... | |
| def | set_register_bank (self, bank) |
| Sets the register bank for the device. More... | |
| def | read_register (self, register) |
| Reads a single byte from the specified register. More... | |
| def | get_device_id (self) |
| Gets the device ID of the AS7343. More... | |
| def | power_on (self, enable=True) |
| Powers on the AS7343. More... | |
| def | power_off (self) |
| Powers off the AS7343. More... | |
| def | spectral_measurement_enable (self, enable=True) |
| Enables or disables spectral measurement. More... | |
| def | spectral_measurement_disable (self) |
| Disables spectral measurement. More... | |
| def | read_all_spectral_data (self) |
| Reads all spectral data from the AS7343. More... | |
| def | get_data (self, channel) |
| Gets the data for a specific channel. More... | |
| def | set_auto_smux (self, auto_smux) |
| Sets the automatic SMUX mode. More... | |
| def | set_led_on (self, led_on=True) |
| Sets the LED state. More... | |
| def | set_led_off (self) |
| Turns off the LED. More... | |
| def | set_led_drive (self, drive) |
| Sets the LED drive current. More... | |
| def | get_red (self) |
| Gets the red channel data. More... | |
| def | get_green (self) |
| Gets the green channel data. More... | |
| def | get_blue (self) |
| Gets the blue channel data. More... | |
| def | get_nir (self) |
| Gets the NIR channel data. More... | |
| def | set_spectral_int_threshold_high (self, spThH) |
| Sets the spectral intensity threshold high value. More... | |
| def | set_spectral_int_threshold_low (self, spThL) |
| Sets the spectral intensity threshold low value. More... | |
| def | spectral_int_enable (self, enable=True) |
| Enables or disables spectral intensity measurement. More... | |
| def | spectral_int_disable (self) |
| Disables spectral intensity measurement. More... | |
| def | set_spectral_threshold_channel (self, channel) |
| Sets the spectral threshold channel. More... | |
| def | get_system_interrupt_status (self) |
| Gets the system interrupt status. More... | |
| def | get_spectral_channel_interrupt_status (self) |
| Gets the spectral channel interrupt status. More... | |
| def | get_spectral_interrupt_high_status (self) |
| Gets the spectral interrupt high status. More... | |
| def | get_spectral_trigger_error_status (self) |
| Gets the spectral trigger error status. More... | |
| def | set_wait_time (self, wait_time) |
| Sets the wait time for the AS7343. More... | |
| def | get_wait_time (self) |
| Gets the wait time for the AS7343. More... | |
| def | wait_time_enable (self, enable=True) |
| Enables or disables the wait time. More... | |
| def | wait_time_disable (self) |
| Disables the wait time. More... | |
| def | get_spectral_valid_status (self) |
| Gets the spectral valid status. More... | |
| def | read_int_enable_reg (self) |
| Reads the interrupt enable register. More... | |
| def | set_gpio_mode (self, mode) |
| Sets the GPIO mode. More... | |
| def | get_gpio_input_status (self) |
| Gets the GPIO input status. More... | |
| def | set_gpio_output (self, output) |
| Sets the GPIO output. More... | |
| def | reset (self) |
| Resets the AS7343. More... | |
| def | set_spectral_int_persistence (self, persistence) |
| Sets the spectral intensity persistence. More... | |
| def | clear_spectral_channel_interrupt (self) |
| Clears the spectral channel interrupt. More... | |
| def | set_a_gain (self, gain) |
| Sets the A gain. More... | |
| def | flicker_detection_enable (self, enable=True) |
| Enables or disables flicker detection. More... | |
| def | flicker_detection_disable (self) |
| Disables flicker detection. More... | |
| def | get_fd_valid_status (self) |
| Gets the flicker detection valid status. More... | |
| def | get_fd_saturation_status (self) |
| Gets the flicker detection saturation status. More... | |
| def | get_fd_frequency (self) |
| Gets the flicker detection frequency. More... | |
Public Attributes | |
| address | |
Properties | |
| connected = property(is_connected) | |
| def qwiic_as7343.QwiicAS7343.__init__ | ( | self, | |
address = None, |
|||
i2c_driver = None |
|||
| ) |
Constructor.
| int,optional | address: The I2C address to use for the device If not provided, the default address is used |
| I2CDriver,optional | i2c_driver: An existing i2c driver object If not provided, a driver object is created |
| def qwiic_as7343.QwiicAS7343.begin | ( | self | ) |
Initializes this device with default parameters.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.clear_spectral_channel_interrupt | ( | self | ) |
Clears the spectral channel interrupt.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.flicker_detection_disable | ( | self | ) |
Disables flicker detection.
| def qwiic_as7343.QwiicAS7343.flicker_detection_enable | ( | self, | |
enable = True |
|||
| ) |
Enables or disables flicker detection.
| bool | enable: True to enable, False to disable |
| def qwiic_as7343.QwiicAS7343.get_blue | ( | self | ) |
Gets the blue channel data.
| def qwiic_as7343.QwiicAS7343.get_data | ( | self, | |
| channel | |||
| ) |
Gets the data for a specific channel.
| int | channel: The channel to get data from |
None if invalid | def qwiic_as7343.QwiicAS7343.get_device_id | ( | self | ) |
Gets the device ID of the AS7343.
| def qwiic_as7343.QwiicAS7343.get_fd_frequency | ( | self | ) |
Gets the flicker detection frequency.
| def qwiic_as7343.QwiicAS7343.get_fd_saturation_status | ( | self | ) |
Gets the flicker detection saturation status.
| def qwiic_as7343.QwiicAS7343.get_fd_valid_status | ( | self | ) |
Gets the flicker detection valid status.
| def qwiic_as7343.QwiicAS7343.get_gpio_input_status | ( | self | ) |
Gets the GPIO input status.
| def qwiic_as7343.QwiicAS7343.get_green | ( | self | ) |
Gets the green channel data.
| def qwiic_as7343.QwiicAS7343.get_nir | ( | self | ) |
Gets the NIR channel data.
| def qwiic_as7343.QwiicAS7343.get_red | ( | self | ) |
Gets the red channel data.
| def qwiic_as7343.QwiicAS7343.get_spectral_channel_interrupt_status | ( | self | ) |
Gets the spectral channel interrupt status.
| def qwiic_as7343.QwiicAS7343.get_spectral_interrupt_high_status | ( | self | ) |
Gets the spectral interrupt high status.
| def qwiic_as7343.QwiicAS7343.get_spectral_trigger_error_status | ( | self | ) |
Gets the spectral trigger error status.
| def qwiic_as7343.QwiicAS7343.get_spectral_valid_status | ( | self | ) |
Gets the spectral valid status.
| def qwiic_as7343.QwiicAS7343.get_system_interrupt_status | ( | self | ) |
Gets the system interrupt status.
| def qwiic_as7343.QwiicAS7343.get_wait_time | ( | self | ) |
Gets the wait time for the AS7343.
| def qwiic_as7343.QwiicAS7343.is_connected | ( | self | ) |
Determines if this device is connected.
True if connected, otherwise False | def qwiic_as7343.QwiicAS7343.power_off | ( | self | ) |
Powers off the AS7343.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.power_on | ( | self, | |
enable = True |
|||
| ) |
Powers on the AS7343.
| bool | enable: True to power on, False to power off |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.read_all_spectral_data | ( | self | ) |
Reads all spectral data from the AS7343.
| def qwiic_as7343.QwiicAS7343.read_int_enable_reg | ( | self | ) |
Reads the interrupt enable register.
| def qwiic_as7343.QwiicAS7343.read_register | ( | self, | |
| register | |||
| ) |
Reads a single byte from the specified register.
| int | register: The register to read from |
| def qwiic_as7343.QwiicAS7343.reset | ( | self | ) |
Resets the AS7343.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_a_gain | ( | self, | |
| gain | |||
| ) |
Sets the A gain.
| int | gain: The A gain to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_auto_smux | ( | self, | |
| auto_smux | |||
| ) |
Sets the automatic SMUX mode.
| int | auto_smux: The automatic SMUX mode to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_gpio_mode | ( | self, | |
| mode | |||
| ) |
Sets the GPIO mode.
| int | mode: The GPIO mode to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_gpio_output | ( | self, | |
| output | |||
| ) |
Sets the GPIO output.
| int | output: The GPIO output to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_led_drive | ( | self, | |
| drive | |||
| ) |
Sets the LED drive current.
| int | drive: The LED drive current to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_led_off | ( | self | ) |
Turns off the LED.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_led_on | ( | self, | |
led_on = True |
|||
| ) |
Sets the LED state.
| bool | led_on: True to turn on the LED, False to turn it off |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_register_bank | ( | self, | |
| bank | |||
| ) |
Sets the register bank for the device.
| int | bank: The register bank to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_spectral_int_persistence | ( | self, | |
| persistence | |||
| ) |
Sets the spectral intensity persistence.
| int | persistence: The spectral intensity persistence to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_spectral_int_threshold_high | ( | self, | |
| spThH | |||
| ) |
Sets the spectral intensity threshold high value.
| 16-bit | positive int spThH: The spectral intensity threshold high value |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_spectral_int_threshold_low | ( | self, | |
| spThL | |||
| ) |
Sets the spectral intensity threshold low value.
| 16-bit | positive int spThL: The spectral intensity threshold low value |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_spectral_threshold_channel | ( | self, | |
| channel | |||
| ) |
Sets the spectral threshold channel.
| int | channel: The spectral threshold channel to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.set_wait_time | ( | self, | |
| wait_time | |||
| ) |
Sets the wait time for the AS7343.
| int | wait_time: The wait time to set |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.spectral_int_disable | ( | self | ) |
Disables spectral intensity measurement.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.spectral_int_enable | ( | self, | |
enable = True |
|||
| ) |
Enables or disables spectral intensity measurement.
| bool | enable: True to enable, False to disable |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.spectral_measurement_disable | ( | self | ) |
Disables spectral measurement.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.spectral_measurement_enable | ( | self, | |
enable = True |
|||
| ) |
Enables or disables spectral measurement.
| bool | enable: True to enable, False to disable |
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.wait_time_disable | ( | self | ) |
Disables the wait time.
True if successful, otherwise False | def qwiic_as7343.QwiicAS7343.wait_time_enable | ( | self, | |
enable = True |
|||
| ) |
Enables or disables the wait time.
| bool | enable: True to enable, False to disable |
True if successful, otherwise False | qwiic_as7343.QwiicAS7343.address |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |