![]() |
Qwiic_AS7265x_Py
2.0.0-1-gdc8e359
Python for SFE Qwiic AS7265x
|
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 | get_device_type (self) |
Returns the device type (HW Version High Byte) More... | |
def | get_hardware_version (self) |
Returns the hardware version of the device. More... | |
def | get_major_firmware_version (self) |
Get the major firmware version of the device. More... | |
def | get_patch_firmware_version (self) |
Get the patch firmware version of the device. More... | |
def | get_build_firmware_version (self) |
Get the build firmware version of the device. More... | |
def | get_temperature (self, device=0) |
Returns the temperature of a given device in Celsius. More... | |
def | get_temperature_average (self) |
Get the average temperature from all three devices. More... | |
def | take_measurements (self) |
Tells IC to take all channel measurements and polls for data ready flag. More... | |
def | take_measurements_with_bulb (self) |
Turns on all bulbs, takes measurements of all channels, turns off all bulbs. More... | |
def | enable_indicator (self) |
Enable the onboard indicator LED. More... | |
def | disable_indicator (self) |
Disable the onboard indicator LED. More... | |
def | enable_bulb (self, device) |
Enable the LED or bulb on a given device. More... | |
def | disable_bulb (self, device) |
Disable the LED or bulb on a given device. More... | |
def | set_gain (self, gain) |
Sets the gain value Gain 0: 1x (power-on default) Gain 1: 3.7x Gain 2: 16x Gain 3: 64x. More... | |
def | set_measurement_mode (self, mode) |
Sets the measurement mode. More... | |
def | set_integration_cycles (self, cycleValue) |
Sets the integration cycle amount. More... | |
def | set_bulb_current (self, current, device) |
Set the current for the specified LED. More... | |
def | set_indicator_current (self, current) |
Set the current limit of onboard LED. More... | |
def | enable_interrupt (self) |
Enable the interrupt pin. More... | |
def | disable_interrupt (self) |
Disable the interrupt pin. More... | |
def | soft_reset (self) |
Does a soft reset. More... | |
def | data_available (self) |
Check if the data ready flag is set in the control setup register. More... | |
def | get_calibrated_a (self) |
def | get_calibrated_b (self) |
def | get_calibrated_c (self) |
def | get_calibrated_d (self) |
def | get_calibrated_e (self) |
def | get_calibrated_f (self) |
def | get_calibrated_g (self) |
def | get_calibrated_h (self) |
def | get_calibrated_i (self) |
def | get_calibrated_j (self) |
def | get_calibrated_k (self) |
def | get_calibrated_l (self) |
def | get_calibrated_r (self) |
def | get_calibrated_s (self) |
def | get_calibrated_t (self) |
def | get_calibrated_u (self) |
def | get_calibrated_v (self) |
def | get_calibrated_w (self) |
def | get_g (self) |
def | get_h (self) |
def | get_i (self) |
def | get_j (self) |
def | get_k (self) |
def | get_l (self) |
def | get_r (self) |
def | get_s (self) |
def | get_t (self) |
def | get_u (self) |
def | get_v (self) |
def | get_w (self) |
def | get_a (self) |
def | get_b (self) |
def | get_c (self) |
def | get_d (self) |
def | get_e (self) |
def | get_f (self) |
def | get_channel (self, channelReg, device) |
Get the channel data for a specific device. More... | |
def | get_calibrated_value (self, calAddress, device) |
Given an address, read four bytes and return the floating point calibrated value. More... | |
def | convert_bytes_to_float (self, myLong) |
Convert a 4-byte value containing the bytes of a float respresentation of a number to a float value. More... | |
def | select_device (self, device) |
Point the master at either the first or the second slave. More... | |
def | virtual_read_register (self, virtualAddr) |
Read a virtual register from the AS7265x. More... | |
def | virtual_write_register (self, virtualAddr, data) |
Write a virtual register to the AS7265x. More... | |
Public Attributes | |
address | |
kTxValid | |
Properties | |
connected = property(is_connected) | |
def qwiic_as7265x.QwiicAS7265x.__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_as7265x.QwiicAS7265x.begin | ( | self | ) |
Initializes this device with default parameters.
True
if successful, otherwise False
def qwiic_as7265x.QwiicAS7265x.convert_bytes_to_float | ( | self, | |
myLong | |||
) |
Convert a 4-byte value containing the bytes of a float respresentation of a number to a float value.
int | myLong: The 4-byte value to convert |
def qwiic_as7265x.QwiicAS7265x.data_available | ( | self | ) |
Check if the data ready flag is set in the control setup register.
True
if the data ready flag is set, otherwise False
def qwiic_as7265x.QwiicAS7265x.disable_bulb | ( | self, | |
device | |||
) |
Disable the LED or bulb on a given device.
int | device: The device to disable the LED for |
Allowable device values are:
def qwiic_as7265x.QwiicAS7265x.disable_indicator | ( | self | ) |
Disable the onboard indicator LED.
def qwiic_as7265x.QwiicAS7265x.disable_interrupt | ( | self | ) |
Disable the interrupt pin.
def qwiic_as7265x.QwiicAS7265x.enable_bulb | ( | self, | |
device | |||
) |
Enable the LED or bulb on a given device.
int | device: The device to enable the LED for |
Allowable device values are:
def qwiic_as7265x.QwiicAS7265x.enable_indicator | ( | self | ) |
Enable the onboard indicator LED.
def qwiic_as7265x.QwiicAS7265x.enable_interrupt | ( | self | ) |
Enable the interrupt pin.
def qwiic_as7265x.QwiicAS7265x.get_a | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_b | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_build_firmware_version | ( | self | ) |
Get the build firmware version of the device.
def qwiic_as7265x.QwiicAS7265x.get_c | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_a | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_b | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_c | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_d | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_e | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_f | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_g | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_h | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_i | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_j | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_k | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_l | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_r | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_s | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_t | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_u | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_v | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_value | ( | self, | |
calAddress, | |||
device | |||
) |
Given an address, read four bytes and return the floating point calibrated value.
int | calAddress: The address to read the calibrated value from |
int | device: The device to read the calibrated value from |
def qwiic_as7265x.QwiicAS7265x.get_calibrated_w | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_channel | ( | self, | |
channelReg, | |||
device | |||
) |
Get the channel data for a specific device.
int | channelReg: The register address of the channel |
int | device: The device to get the channel data from |
def qwiic_as7265x.QwiicAS7265x.get_d | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_device_type | ( | self | ) |
Returns the device type (HW Version High Byte)
def qwiic_as7265x.QwiicAS7265x.get_e | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_f | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_g | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_h | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_hardware_version | ( | self | ) |
Returns the hardware version of the device.
def qwiic_as7265x.QwiicAS7265x.get_i | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_j | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_k | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_l | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_major_firmware_version | ( | self | ) |
Get the major firmware version of the device.
def qwiic_as7265x.QwiicAS7265x.get_patch_firmware_version | ( | self | ) |
Get the patch firmware version of the device.
def qwiic_as7265x.QwiicAS7265x.get_r | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_s | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_t | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_temperature | ( | self, | |
device = 0 |
|||
) |
Returns the temperature of a given device in Celsius.
int | device: The device to get the temperature from |
def qwiic_as7265x.QwiicAS7265x.get_temperature_average | ( | self | ) |
Get the average temperature from all three devices.
def qwiic_as7265x.QwiicAS7265x.get_u | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_v | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.get_w | ( | self | ) |
def qwiic_as7265x.QwiicAS7265x.is_connected | ( | self | ) |
Determines if this device is connected.
True
if connected, otherwise False
def qwiic_as7265x.QwiicAS7265x.select_device | ( | self, | |
device | |||
) |
Point the master at either the first or the second slave.
int | device: The device to select |
Allowable device values are:
def qwiic_as7265x.QwiicAS7265x.set_bulb_current | ( | self, | |
current, | |||
device | |||
) |
Set the current for the specified LED.
int | current: The current to set the LED to |
Allowable current values are:
int | device: The device to set the current for |
def qwiic_as7265x.QwiicAS7265x.set_gain | ( | self, | |
gain | |||
) |
Sets the gain value Gain 0: 1x (power-on default) Gain 1: 3.7x Gain 2: 16x Gain 3: 64x.
int | gain: The gain value to set |
def qwiic_as7265x.QwiicAS7265x.set_indicator_current | ( | self, | |
current | |||
) |
Set the current limit of onboard LED.
Default is max 8mA = 0b11.
int | current: The current limit to set the indicator LED to |
Allowable current values are:
def qwiic_as7265x.QwiicAS7265x.set_integration_cycles | ( | self, | |
cycleValue | |||
) |
Sets the integration cycle amount.
Give this function a byte from 0 to 255. Time will be 2.8ms * [integration cycles + 1]
int | cycleValue: The number of integration cycles to set |
def qwiic_as7265x.QwiicAS7265x.set_measurement_mode | ( | self, | |
mode | |||
) |
Sets the measurement mode.
Mode 0: 4 channels out of 6 (see datasheet) Mode 1: Different 4 channels out of 6 (see datasheet) Mode 2: All 6 channels continuously Mode 3: One-shot reading of all channels
int | mode: The mode to set |
Allowable mode values are:
def qwiic_as7265x.QwiicAS7265x.soft_reset | ( | self | ) |
Does a soft reset.
Give sensor at least 1000ms to reset
def qwiic_as7265x.QwiicAS7265x.take_measurements | ( | self | ) |
Tells IC to take all channel measurements and polls for data ready flag.
def qwiic_as7265x.QwiicAS7265x.take_measurements_with_bulb | ( | self | ) |
Turns on all bulbs, takes measurements of all channels, turns off all bulbs.
def qwiic_as7265x.QwiicAS7265x.virtual_read_register | ( | self, | |
virtualAddr | |||
) |
Read a virtual register from the AS7265x.
int | virtualAddr: The virtual register address to read |
def qwiic_as7265x.QwiicAS7265x.virtual_write_register | ( | self, | |
virtualAddr, | |||
data | |||
) |
Write a virtual register to the AS7265x.
int | virtualAddr: The virtual register address to write |
int | data: The data byte to write to the virtual register |
qwiic_as7265x.QwiicAS7265x.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 |
qwiic_as7265x.QwiicAS7265x.kTxValid |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |