![]() |
Qwiic_LSM6DSO_Py
2.0.0
Python for SFE Qwiic LSM6DSO
|
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 | reset_member_variables (self) |
Resets member variables to their default values. More... | |
def | software_reset (self) |
Resets the device to its default settings. More... | |
def | set_block_data_update (self, enable) |
Sets whether data registers should only update after both the MSB and LSB registers have been read. More... | |
def | get_status_reg (self) |
Returns the status register value. More... | |
def | set_accel_range (self, range) |
Sets the accelerometer full scale range. More... | |
def | get_accel_range_raw (self) |
Returns the accelerometer full scale range, raw register value. More... | |
def | get_accel_range_g (self) |
Returns the accelerometer full scale range in G. More... | |
def | set_accel_data_rate (self, rate) |
Sets the accelerometer output data rate. More... | |
def | get_accel_data_rate_raw (self) |
Returns the accelerometer output data rate, raw register value. More... | |
def | get_accel_data_rate_odr (self) |
Returns the accelerometer output data rate in Hz. More... | |
def | set_accel_full_scale (self, enable) |
Sets the accelerometer full scale mode. More... | |
def | get_accel_full_scale (self) |
Returns the accelerometer full scale mode. More... | |
def | set_accel_high_perf (self, enable) |
Sets the accelerometer high performance mode. More... | |
def | get_accel_high_perf (self) |
Returns the accelerometer high performance mode. More... | |
def | set_gyro_range (self, range) |
Sets the gyroscope full scale range. More... | |
def | get_gyro_range_raw (self) |
Returns the gyroscope full scale range, raw register value. More... | |
def | get_gyro_range_dps (self) |
Returns the gyroscope full scale range in DPS. More... | |
def | set_gyro_data_rate (self, rate) |
Sets the gyroscope output data rate. More... | |
def | get_gyro_data_rate_raw (self) |
Returns the gyroscope output data rate, raw register value. More... | |
def | get_gyro_data_rate_odr (self) |
Returns the gyroscope output data rate in Hz. More... | |
def | read_raw_accel_x (self) |
Reads the raw accelerometer X axis value. More... | |
def | read_float_accel_x (self) |
Reads the accelerometer X axis value in G. More... | |
def | read_raw_accel_y (self) |
Reads the raw accelerometer Y axis value. More... | |
def | read_float_accel_y (self) |
Reads the accelerometer Y axis value in G. More... | |
def | read_raw_accel_z (self) |
Reads the raw accelerometer Z axis value. More... | |
def | read_float_accel_z (self) |
Reads the accelerometer Z axis value in G. More... | |
def | read_raw_accel_all (self) |
Reads the raw accelerometer X, Y, and Z axis values. More... | |
def | read_float_accel_all (self) |
Reads the accelerometer X, Y, and Z axis values in G. More... | |
def | calc_accel (self, input) |
Calculates the acceleration in G based on the raw input value. More... | |
def | read_raw_gyro_x (self) |
Reads the raw gyroscope X axis value. More... | |
def | read_float_gyro_x (self) |
Reads the gyroscope X axis value in degrees per second. More... | |
def | read_raw_gyro_y (self) |
Reads the raw gyroscope Y axis value. More... | |
def | read_float_gyro_y (self) |
Reads the gyroscope Y axis value in degrees per second. More... | |
def | read_raw_gyro_z (self) |
Reads the raw gyroscope Z axis value. More... | |
def | read_float_gyro_z (self) |
Reads the gyroscope Z axis value in degrees per second. More... | |
def | read_raw_gyro_all (self) |
Reads the raw gyroscope X, Y, and Z axis values. More... | |
def | read_float_gyro_all (self) |
Reads the gyroscope X, Y, and Z axis values in degrees per second. More... | |
def | calc_gyro (self, input) |
Calculates the angular velocity in degrees per second based on the raw input value. More... | |
def | read_raw_accel_gyro_all (self) |
Reads the raw accelerometer and gyroscope X, Y, and Z axis values. More... | |
def | read_float_accel_gyro_all (self) |
Reads the accelerometer and gyroscope X, Y, and Z axis values in G and degrees per second. More... | |
def | read_raw_temp (self) |
Reads the raw temperature value. More... | |
def | read_temp_c (self) |
Reads the temperature value in degrees Celsius. More... | |
def | read_temp_f (self) |
Reads the temperature value in degrees Fahrenheit. More... | |
Public Attributes | |
address | |
accel_raw_to_g | |
gyro_raw_to_dps | |
Static Public Attributes | |
device_name = _DEFAULT_NAME | |
available_addresses = _AVAILABLE_I2C_ADDRESS | |
int | FUNC_CFG_ACCESS = 0x01 |
int | LSM6DO_PIN_CTRL = 0x02 |
int | FIFO_CTRL1 = 0x07 |
int | FIFO_CTRL2 = 0x08 |
int | FIFO_CTRL3 = 0x09 |
int | FIFO_CTRL4 = 0x0A |
int | COUNTER_BDR_REG1 = 0x0B |
int | COUNTER_BDR_REG2 = 0x0C |
int | INT1_CTRL = 0x0D |
int | INT2_CTRL = 0x0E |
int | WHO_AM_I_REG = 0x0F |
int | CTRL1_XL = 0x10 |
int | CTRL2_G = 0x11 |
int | CTRL3_C = 0x12 |
int | CTRL4_C = 0x13 |
int | CTRL5_C = 0x14 |
int | CTRL6_C = 0x15 |
int | CTRL7_G = 0x16 |
int | CTRL8_XL = 0x17 |
int | CTRL9_XL = 0x18 |
int | CTRL10_C = 0x19 |
int | ALL_INT_SRC = 0x1A |
int | WAKE_UP_SRC = 0x1B |
int | TAP_SRC = 0x1C |
int | D6D_SRC = 0x1D |
int | STATUS_REG = 0x1E |
int | OUT_TEMP_L = 0x20 |
int | OUT_TEMP_H = 0x21 |
int | OUTX_L_G = 0x22 |
int | OUTX_H_G = 0x23 |
int | OUTY_L_G = 0x24 |
int | OUTY_H_G = 0x25 |
int | OUTZ_L_G = 0x26 |
int | OUTZ_H_G = 0x27 |
int | OUTX_L_A = 0x28 |
int | OUTX_H_A = 0x29 |
int | OUTY_L_A = 0x2A |
int | OUTY_H_A = 0x2B |
int | OUTZ_L_A = 0x2C |
int | OUTZ_H_A = 0x2D |
int | EMB_FUNC_STATUS_MP = 0x35 |
int | FSM_FUNC_STATUS_A_MP = 0x36 |
int | FSM_FUNC_STATUS_B_MP = 0x37 |
int | STATUS_MASTER_MAINPAGE = 0x39 |
int | FIFO_STATUS1 = 0x3A |
int | FIFO_STATUS2 = 0x3B |
int | TIMESTAMP0_REG = 0x40 |
int | TIMESTAMP1_REG = 0x41 |
int | TIMESTAMP2_REG = 0x42 |
int | TIMESTAMP3_REG = 0x43 |
int | TAP_CFG0 = 0x56 |
int | TAP_CFG1 = 0x57 |
int | TAP_CFG2 = 0x58 |
int | TAP_THS_6D = 0x59 |
int | INT_DUR2 = 0x5A |
int | WAKE_UP_THS = 0x5B |
int | WAKE_UP_DUR = 0x5C |
int | FREE_FALL = 0x5D |
int | MD1_CFG = 0x5E |
int | MD2_CFG = 0x5F |
int | I3C_BUS_AVB = 0x62 |
int | INTERNAL_FREQ_FINE = 0x63 |
int | INT_OIS = 0x6F |
int | CTRL1_OIS = 0x70 |
int | CTRL2_OIS = 0x71 |
int | CTRL3_OIS = 0x72 |
int | X_OFS_USR = 0x73 |
int | Y_OFS_USR = 0x74 |
int | Z_OFS_USR = 0x75 |
int | FIFO_DATA_OUT_TAG = 0x78 |
int | FIFO_DATA_OUT_X_L = 0x79 |
int | FIFO_DATA_OUT_X_H = 0x7A |
int | FIFO_DATA_OUT_Y_L = 0x7B |
int | FIFO_DATA_OUT_Y_H = 0x7C |
int | FIFO_DATA_OUT_Z_L = 0x7D |
int | FIFO_DATA_OUT_Z_H = 0x7E |
int | WHO_AM_I_VALUE = 0x6C |
int | SW_RESET_DEVICE = 0x01 |
int | FS_XL_2g = 0x00 |
int | FS_XL_16g = 0x01 |
int | FS_XL_4g = 0x02 |
int | FS_XL_8g = 0x03 |
int | FS_XL_MASK = 0xF3 |
int | FS_XL_POS = 2 |
int | FS_G_125dps = 0x01 |
int | FS_G_250dps = 0x00 |
int | FS_G_500dps = 0x02 |
int | FS_G_1000dps = 0x04 |
int | FS_G_2000dps = 0x06 |
int | FS_G_MASK = 0xF1 |
int | FS_G_POS = 1 |
int | ODR_DISABLE = 0x00 |
int | ODR_12_5Hz = 0x01 |
int | ODR_26Hz = 0x02 |
int | ODR_52Hz = 0x03 |
int | ODR_104Hz = 0x04 |
int | ODR_208Hz = 0x05 |
int | ODR_416Hz = 0x06 |
int | ODR_833Hz = 0x07 |
int | ODR_1660Hz = 0x08 |
int | ODR_3330Hz = 0x09 |
int | ODR_6660Hz = 0x0A |
int | ODR_1_6Hz = 0x0B |
int | ODR_MASK = 0x0F |
int | ODR_POS = 4 |
Properties | |
connected = property(is_connected) | |
def qwiic_lsm6dso.QwiicLSM6DSO.__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_lsm6dso.QwiicLSM6DSO.begin | ( | self | ) |
Initializes this device with default parameters.
True
if successful, otherwise False
def qwiic_lsm6dso.QwiicLSM6DSO.calc_accel | ( | self, | |
input | |||
) |
Calculates the acceleration in G based on the raw input value.
int | input: The raw input value |
def qwiic_lsm6dso.QwiicLSM6DSO.calc_gyro | ( | self, | |
input | |||
) |
Calculates the angular velocity in degrees per second based on the raw input value.
int | input: The raw input value |
def qwiic_lsm6dso.QwiicLSM6DSO.get_accel_data_rate_odr | ( | self | ) |
Returns the accelerometer output data rate in Hz.
def qwiic_lsm6dso.QwiicLSM6DSO.get_accel_data_rate_raw | ( | self | ) |
Returns the accelerometer output data rate, raw register value.
def qwiic_lsm6dso.QwiicLSM6DSO.get_accel_full_scale | ( | self | ) |
Returns the accelerometer full scale mode.
def qwiic_lsm6dso.QwiicLSM6DSO.get_accel_high_perf | ( | self | ) |
Returns the accelerometer high performance mode.
def qwiic_lsm6dso.QwiicLSM6DSO.get_accel_range_g | ( | self | ) |
Returns the accelerometer full scale range in G.
def qwiic_lsm6dso.QwiicLSM6DSO.get_accel_range_raw | ( | self | ) |
Returns the accelerometer full scale range, raw register value.
def qwiic_lsm6dso.QwiicLSM6DSO.get_gyro_data_rate_odr | ( | self | ) |
Returns the gyroscope output data rate in Hz.
def qwiic_lsm6dso.QwiicLSM6DSO.get_gyro_data_rate_raw | ( | self | ) |
Returns the gyroscope output data rate, raw register value.
def qwiic_lsm6dso.QwiicLSM6DSO.get_gyro_range_dps | ( | self | ) |
Returns the gyroscope full scale range in DPS.
def qwiic_lsm6dso.QwiicLSM6DSO.get_gyro_range_raw | ( | self | ) |
Returns the gyroscope full scale range, raw register value.
def qwiic_lsm6dso.QwiicLSM6DSO.get_status_reg | ( | self | ) |
Returns the status register value.
Bit 0 is accelerometer data ready, bit 1 is gyroscope data ready, and bit 2 is temperature data ready
def qwiic_lsm6dso.QwiicLSM6DSO.is_connected | ( | self | ) |
Determines if this device is connected.
True
if connected, otherwise False
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_accel_all | ( | self | ) |
Reads the accelerometer X, Y, and Z axis values in G.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_accel_gyro_all | ( | self | ) |
Reads the accelerometer and gyroscope X, Y, and Z axis values in G and degrees per second.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_accel_x | ( | self | ) |
Reads the accelerometer X axis value in G.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_accel_y | ( | self | ) |
Reads the accelerometer Y axis value in G.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_accel_z | ( | self | ) |
Reads the accelerometer Z axis value in G.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_gyro_all | ( | self | ) |
Reads the gyroscope X, Y, and Z axis values in degrees per second.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_gyro_x | ( | self | ) |
Reads the gyroscope X axis value in degrees per second.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_gyro_y | ( | self | ) |
Reads the gyroscope Y axis value in degrees per second.
def qwiic_lsm6dso.QwiicLSM6DSO.read_float_gyro_z | ( | self | ) |
Reads the gyroscope Z axis value in degrees per second.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_accel_all | ( | self | ) |
Reads the raw accelerometer X, Y, and Z axis values.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_accel_gyro_all | ( | self | ) |
Reads the raw accelerometer and gyroscope X, Y, and Z axis values.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_accel_x | ( | self | ) |
Reads the raw accelerometer X axis value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_accel_y | ( | self | ) |
Reads the raw accelerometer Y axis value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_accel_z | ( | self | ) |
Reads the raw accelerometer Z axis value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_gyro_all | ( | self | ) |
Reads the raw gyroscope X, Y, and Z axis values.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_gyro_x | ( | self | ) |
Reads the raw gyroscope X axis value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_gyro_y | ( | self | ) |
Reads the raw gyroscope Y axis value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_gyro_z | ( | self | ) |
Reads the raw gyroscope Z axis value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_raw_temp | ( | self | ) |
Reads the raw temperature value.
def qwiic_lsm6dso.QwiicLSM6DSO.read_temp_c | ( | self | ) |
Reads the temperature value in degrees Celsius.
def qwiic_lsm6dso.QwiicLSM6DSO.read_temp_f | ( | self | ) |
Reads the temperature value in degrees Fahrenheit.
def qwiic_lsm6dso.QwiicLSM6DSO.reset_member_variables | ( | self | ) |
Resets member variables to their default values.
def qwiic_lsm6dso.QwiicLSM6DSO.set_accel_data_rate | ( | self, | |
rate | |||
) |
Sets the accelerometer output data rate.
Can be 1.6Hz, 12.5Hz, 26Hz, 52Hz, 104Hz, 208Hz, 416Hz, 833Hz, 1660Hz, 3330Hz, 6660Hz, or DISABLE
int | rate: The output data rate to set |
True
if successful, otherwise False
def qwiic_lsm6dso.QwiicLSM6DSO.set_accel_full_scale | ( | self, | |
enable | |||
) |
Sets the accelerometer full scale mode.
bool | enable: True to enable, False to disable |
def qwiic_lsm6dso.QwiicLSM6DSO.set_accel_high_perf | ( | self, | |
enable | |||
) |
Sets the accelerometer high performance mode.
bool | enable: True to enable, False to disable |
def qwiic_lsm6dso.QwiicLSM6DSO.set_accel_range | ( | self, | |
range | |||
) |
Sets the accelerometer full scale range.
Can be 2g, 4g, 8g, or 16g
int | range: The full scale range to set |
True
if successful, otherwise False
def qwiic_lsm6dso.QwiicLSM6DSO.set_block_data_update | ( | self, | |
enable | |||
) |
Sets whether data registers should only update after both the MSB and LSB registers have been read.
bool | enable: True to enable, False to disable |
def qwiic_lsm6dso.QwiicLSM6DSO.set_gyro_data_rate | ( | self, | |
rate | |||
) |
Sets the gyroscope output data rate.
Can be 12.5Hz, 26Hz, 52Hz, 104Hz, 208Hz, 416Hz, 833Hz, 1660Hz, 3330Hz, or 6660Hz
float | rate: The output data rate to set |
True
if successful, otherwise False
def qwiic_lsm6dso.QwiicLSM6DSO.set_gyro_range | ( | self, | |
range | |||
) |
Sets the gyroscope full scale range.
Can be 125dps, 250dps, 500dps, 1000dps, or 2000dps
int | range: The full scale range to set |
True
if successful, otherwise False
def qwiic_lsm6dso.QwiicLSM6DSO.software_reset | ( | self | ) |
Resets the device to its default settings.
qwiic_lsm6dso.QwiicLSM6DSO.accel_raw_to_g |
qwiic_lsm6dso.QwiicLSM6DSO.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 |
qwiic_lsm6dso.QwiicLSM6DSO.gyro_raw_to_dps |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |