UIFlow Guide
Reads and displays current IMU attitude data.
from m5stack import *
from m5ui import *
from uiflow import *
import imu
setScreenColor(0x222222)
imu0 = imu.IMU()
while True:
print((str('X: ') + str((imu0.ypr[1]))))
print((str('Y: ') + str((imu0.ypr[2]))))
print((str('X ACC: ') + str((imu0.acceleration[0]))))
print((str('Y ACC: ') + str((imu0.acceleration[1]))))
print((str('Z ACC: ') + str((imu0.acceleration[2]))))
print((str('X Gyr: ') + str((imu0.gyro[0]))))
print((str('Y Gyr: ') + str((imu0.gyro[1]))))
print((str('Z Gyr: ') + str((imu0.gyro[2]))))
wait_ms(2)
imu0.ypr[1]
imu0.ypr[2]
imu0.acceleration[0]
imu0.acceleration[1]
imu0.acceleration[2]
imu0.gyro[0]
imu0.gyro[1]
imu0.gyro[2]