<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ATOMS3R accelerometer and gyro readings always 0]]></title><description><![CDATA[<p dir="auto">Hi everyone,<br />
I bought an ATOMS3R, and burned the UIFlow2.0 ATOMS3R firmware on it. In UIFlow 2.0 I tried to print the accelerometer and gyroscope readings with below code.<br />
However, the readings are all zero regardless of how I move or shake the ATOM. Did I miss an initialization or calibration step?</p>
<pre><code>import os, sys, io
import M5
from M5 import *
import time

accel = None
gyro = None


def setup():
  global accel, gyro

  M5.begin()


def loop():
  global accel, gyro
  M5.update()
  acc_x, acc_y, acc_z = Imu.getAccel()
  gyro_x, gyro_y, gyro_z = Imu.getGyro()
  print(f'accel: {acc_x}x, {acc_y}y, {acc_z}z')
  print(f'gyro: {gyro_x}x, {gyro_y}y, {gyro_z}z')
  time.sleep(1)


if __name__ == '__main__':
  try:
    setup()
    while True:
      loop()
  except (Exception, KeyboardInterrupt) as e:
    try:
      from utility import print_error_msg
      print_error_msg(e)
    except ImportError:
      print("please update to latest firmware")

</code></pre>
]]></description><link>https://community.m5stack.com/topic/7601/atoms3r-accelerometer-and-gyro-readings-always-0</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 10:39:47 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7601.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Jun 2025 20:40:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ATOMS3R accelerometer and gyro readings always 0 on Sat, 14 Jun 2025 19:53:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a> thx for the hint! It's just as you said about acceleration.</p>
<p dir="auto">Btw: UIFlow works. I just installed the incorrect firmware (UIFlow2.0 instead of UIFlow2.0 AtomS3R).</p>
<p dir="auto">Thanks again everyone!</p>
]]></description><link>https://community.m5stack.com/post/29252</link><guid isPermaLink="true">https://community.m5stack.com/post/29252</guid><dc:creator><![CDATA[toffifee]]></dc:creator><pubDate>Sat, 14 Jun 2025 19:53:02 GMT</pubDate></item><item><title><![CDATA[Reply to ATOMS3R accelerometer and gyro readings always 0 on Wed, 11 Jun 2025 21:00:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toffifee" aria-label="Profile: toffifee">@<bdi>toffifee</bdi></a> The raw outputs are beyond the ken of mortal man, except Accel which can easily be observed by placing it on a stationary level surface and observing that the accel values are stationary and one of the axes, usually Z is showing 1.00 (gravity).<br />
Roll it onto its side and the 1.00 should move to another axis.<br />
The other two outputs Gyro and Mag are best left to a positioning algorithm.</p>
]]></description><link>https://community.m5stack.com/post/29225</link><guid isPermaLink="true">https://community.m5stack.com/post/29225</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Wed, 11 Jun 2025 21:00:57 GMT</pubDate></item><item><title><![CDATA[Reply to ATOMS3R accelerometer and gyro readings always 0 on Wed, 11 Jun 2025 20:48:06 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for answering, guys.<br />
I tried the Arduino example as suggested by <a class="plugin-mentions-user plugin-mentions-a" href="/user/kuriko" aria-label="Profile: kuriko">@<bdi>kuriko</bdi></a> and indeed I get non-zero readings! So maybe <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> is right to assume that UIFlow2 doesn't fully support M5AtomS3R yet.</p>
<p dir="auto">The IMU readings don't make a lot of sense to me yet, I will next try to calibrate with this example code:</p>
<p dir="auto"><a href="https://github.com/m5stack/M5Unified/blob/master/examples/Basic/Imu/Imu.ino" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Unified/blob/master/examples/Basic/Imu/Imu.ino</a></p>
]]></description><link>https://community.m5stack.com/post/29224</link><guid isPermaLink="true">https://community.m5stack.com/post/29224</guid><dc:creator><![CDATA[toffifee]]></dc:creator><pubDate>Wed, 11 Jun 2025 20:48:06 GMT</pubDate></item><item><title><![CDATA[Reply to ATOMS3R accelerometer and gyro readings always 0 on Tue, 10 Jun 2025 07:03:29 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/toffifee" aria-label="Profile: toffifee">@<bdi>toffifee</bdi></a></p>
<p dir="auto">your code works for me using an M5AtomS3 (non <strong>R</strong>).</p>
<p dir="auto">That said, M5AtomS3 uses a different IMU chip (MPU68860) than M5AtomS3<strong>R</strong> (BMI270 / BMM150). So my best guess would be that UIFlow2 is not fully adapted to M5AtomS3R (yet).</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hacxx" aria-label="Profile: hacxx">@<bdi>hacxx</bdi></a> : FYI <a class="plugin-mentions-user plugin-mentions-a" href="/user/toffifee" aria-label="Profile: toffifee">@<bdi>toffifee</bdi></a> is using UIFlow2 - there is no <code>Imu.begin()</code>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/29210</link><guid isPermaLink="true">https://community.m5stack.com/post/29210</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 10 Jun 2025 07:03:29 GMT</pubDate></item><item><title><![CDATA[Reply to ATOMS3R accelerometer and gyro readings always 0 on Mon, 09 Jun 2025 13:10:17 GMT]]></title><description><![CDATA[<p dir="auto">It looks like you're missing initialization for the IMU sensor. Try adding Imu.begin() inside the setup() function after M5.begin(). Without this, the sensor may not start properly, leading to zero readings. Also, ensure you're using the latest firmware and that the device isn't in USB mode, which can disable sensor updates.</p>
]]></description><link>https://community.m5stack.com/post/29200</link><guid isPermaLink="true">https://community.m5stack.com/post/29200</guid><dc:creator><![CDATA[hacxx]]></dc:creator><pubDate>Mon, 09 Jun 2025 13:10:17 GMT</pubDate></item><item><title><![CDATA[Reply to ATOMS3R accelerometer and gyro readings always 0 on Mon, 09 Jun 2025 01:18:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/toffifee" aria-label="Profile: toffifee">@<bdi>toffifee</bdi></a><br />
have you tried Arduino example? we can determine if that was a hardware problem<br />
<a href="https://github.com/m5stack/M5AtomS3/blob/main/examples/Basics/imu/imu.ino" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5AtomS3/blob/main/examples/Basics/imu/imu.ino</a></p>
]]></description><link>https://community.m5stack.com/post/29199</link><guid isPermaLink="true">https://community.m5stack.com/post/29199</guid><dc:creator><![CDATA[kuriko]]></dc:creator><pubDate>Mon, 09 Jun 2025 01:18:19 GMT</pubDate></item></channel></rss>