maix.ext_dev.qmi8658
maix.ext_dev.qmi8658 module
You can use
maix.ext_dev.qmi8658
to access this module with MaixPy
This module is generated from MaixPy and MaixCDK
Module
No module
Enum
Variable
Function
Class
QMI8658
QMI8656 driver class
C++ defination code:
class QMI8658
__init__
def __init__(self, i2c_bus: int = -1, addr: int = 107, freq: int = 400000, mode: maix.ext_dev.imu.Mode = ..., acc_scale: maix.ext_dev.imu.AccScale = ..., acc_odr: maix.ext_dev.imu.AccOdr = ..., gyro_scale: maix.ext_dev.imu.GyroScale = ..., gyro_odr: maix.ext_dev.imu.GyroOdr = ..., block: bool = True) -> None
Construct a new QMI8658 object, will open QMI8658
item | description |
---|---|
type | func |
param | i2c_bus: i2c bus number. Automatically selects the on-board qmi8658 when -1 is passed in. addr: QMI8658 i2c addr. freq: QMI8658 freq mode: QMI8658 Mode: ACC_ONLY/GYRO_ONLY/DUAL acc_scale: acc scale, see @qmi8658::AccScale acc_odr: acc output data rate, see @qmi8658::AccOdr gyro_scale: gyro scale, see @qmi8658::GyroScale gyro_odr: gyro output data rate, see @qmi8658::GyroOdr block: block or non-block, defalut is true |
static | False |
C++ defination code:
QMI8658(int i2c_bus=-1, int addr=0x6B, int freq=400000, maix::ext_dev::imu::Mode mode=maix::ext_dev::imu::Mode::DUAL, maix::ext_dev::imu::AccScale acc_scale=maix::ext_dev::imu::AccScale::ACC_SCALE_2G, maix::ext_dev::imu::AccOdr acc_odr=maix::ext_dev::imu::AccOdr::ACC_ODR_8000, maix::ext_dev::imu::GyroScale gyro_scale=maix::ext_dev::imu::GyroScale::GYRO_SCALE_16DPS, maix::ext_dev::imu::GyroOdr gyro_odr=maix::ext_dev::imu::GyroOdr::GYRO_ODR_8000, bool block=true)
read
def read(self) -> list[float]
Read data from QMI8658.
item | description |
---|---|
type | func |
return | list type. If only one of the outputs is initialized, only [x,y,z] of that output will be returned. If all outputs are initialized, [acc_x, acc_y, acc_z, gyro_x, gyro_y, gyro_z] is returned. |
static | False |
C++ defination code:
std::vector<float> read()