IMU
IMU is used to control the built-in accelerometer and gyroscope inside the host device. Below is the detailed IMU support for the host:
MPU6886 |
BMI270 |
BMM150 |
|
---|---|---|---|
AtomS3 |
✔ |
||
AtomS3 Lite |
|||
AtomS3U |
|||
StampS3 |
|||
CoreS3 |
✔ |
✔ |
|
Core2 |
✔ |
||
TOUGH |
|||
StickC Plus |
✔ |
||
StickC Plus2 |
✔ |
Micropython Example:
pass
UIFLOW2 Example:
pass
class IMU
Important
Methods of the IMU Class heavily rely on M5.begin()
and M5.update()
.
All calls to methods of IMU objects should be placed after M5.begin()
, and M5.update()
should be called in the main loop.
Methods
- IMU.getAccel() tuple[float, float, float]
Get the tuple of x, y, and z values of the accelerometer.
UIFLOW2: