I am using async method to display data of roll, pitch, heading on LCD. Currently the Fusion module is created using MPU9150. I have used fusion.py in sync method with MPU9250 and it works fine.
But in async method, it gives me error of MPU9250 don't have mag_trigger. In 9150, mag_reading is used Initiate a mag reading.
So what if i replace mag_reading with "" imu.mag.xyz "".
Code: Select all
async def read_coro():
imu.mag.xyz
await asyncio.sleep_ms(20) # Plenty of time for mag to be ready
return imu.accel.xyz, imu.gyro.xyz, imu.mag.xyz
When i replace the above code, it give me data but its not getting updated after one reading.