IMU Get ACC reports gyro
-
There appears to be an issue with the IMU module in M5Flow. The function "Get X Acc" appears to report the orientation of the device, instead of the accelleration. Here is the python code to reproduce it:
from m5stack import *
from m5ui import *
from uiflow import *
import imusetScreenColor(0x222222)
imu0 = imu.IMU()
while True:
lcd.clear()
lcd.print((imu0.acceleration[0]), 0, 0, 0xffffff)
lcd.print((imu0.acceleration[1]), 0, 20, 0xffffff)
wait_ms(400)
wait_ms(2)If you run the program, the displayed numbers are between -1 and 1 depending on how you turn the device.
I also tried the C/C++ example for the M5Stack located here: https://github.com/m5stack/M5Stack/blob/master/examples/Basics/IMU/IMU.ino
This example seems to run fine. -
@fracman I am observing possibly a similar situation. Get X Gyr seems to return an unpredictable and small (-2 to 2) range no matter how I turn my M5StickC.
Are the values read from current IMU meters, or are data buffered? Feels like the latter.
-
it could be that the gyro is in Gravities which would explain the low reading.
I was watching a vid and normally the readings shoud be in miligravities.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login