maix.ext_dev.lsm6dsowtr

maix.ext_dev.lsm6dsowtr module

You can use maix.ext_dev.lsm6dsowtr to access this module with MaixPy
This module is generated from MaixPy and MaixCDK

Module

No module

Enum

Variable

Function

Class

LSM6DSOWTR

LSM6DSOWTR driver class

C++ defination code:

class LSM6DSOWTR

__init__

def __init__(self, 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 LSM6DSOWTR object, will open LSM6DSOWTR

item description
type func
param mode: LSM6DSOWTR Mode: ACC_ONLY/GYRO_ONLY/DUAL
acc_scale: acc scale, see @imu::AccScale
acc_odr: acc output data rate, see @imu::AccOdr
gyro_scale: gyro scale, see @imu::GyroScale
gyro_odr: gyro output data rate, see @imu::GyroOdr
block: block or non-block, defalut is true
static False

C++ defination code:

LSM6DSOWTR(
            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 LSM6DSOWTR.

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()