<?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[ATOM S3 - Problems writing IMU Registers]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm currently developing a solution for acceleration data extraction with the M5Stack ATOM S3 module which already includes a MPU 6886 IMU sensor. In its datasheet I'm told it is capable of reaching 4 kHz of sampling rate for the accelerometer. However, while trying to change the registers in what I thought would be the correct settings for highest performance in terms of sampling speeds, it always outputs acceleration in the range of +-8 g and with sampling speed of 250Hz. This is true for any register values I write. Thus, I suspect the writing of such registers is being wrongly handled.</p>
<p dir="auto">My questions are:</p>
<ul>
<li>Is there any library that handles the writing of these registers without fail?</li>
<li>Am I choosing the right register addresses and new values?</li>
</ul>
<p dir="auto">I also add here a portion of my code corresponding of the writing of the IMU registers:</p>
<pre><code>// Setup for IMU
void setupIMU() {
    Wire.begin();  

    writeRegister(0x6B, 0x09);  // Wake up MPU6886
    delay(10);

    writeRegister(0x1C, 0x18);  // Set accelerometer to ±16g   
    delay(10);

    writeRegister(0x1D, 0x08);  // Disable Low-Pass Filter (more noise)
    delay(10);

    writeRegister(0x6C, 0x07);  // Disable gyroscope
    delay(10);

    writeRegister(0x1B, 0x03);  // Set gyroscope configuration (if needed)
    delay(10);
}

void writeRegister(uint8_t reg, uint8_t value) {
    Wire.beginTransmission(0x68);  // MPU6886 I2C address
    Wire.write(reg);               // Register address
    Wire.write(value);             // Value to write
    Wire.endTransmission();        // End transmission
}

void setup() {

  Serial.begin(115200); // Initialize serial communication at 115200 baud rate
  while (!Serial); // Wait for serial to initialize

  M5.begin();
  auto cfg = M5.config();

  setupIMU();

}

</code></pre>
<p dir="auto">Thank you</p>
]]></description><link>https://community.m5stack.com/topic/6964/atom-s3-problems-writing-imu-registers</link><generator>RSS for Node</generator><lastBuildDate>Mon, 04 May 2026 15:26:28 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6964.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Nov 2024 10:34:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ATOM S3 - Problems writing IMU Registers on Mon, 11 Nov 2024 15:58:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hriq105" aria-label="Profile: hriq105">@<bdi>hriq105</bdi></a></p>
<p dir="auto">I found the answer to my problem of writing on the IMU registers on another post here:</p>
<p dir="auto"><a href="https://community.m5stack.com/topic/6959/finding-imu-3d-example-code">https://community.m5stack.com/topic/6959/finding-imu-3d-example-code</a></p>
<p dir="auto">However, I'm still having some problems with finding out how to set them up to get the full 4 kHz of acceleration data mentioned in the datasheet. If anyone knows this, please let me know.</p>
]]></description><link>https://community.m5stack.com/post/27016</link><guid isPermaLink="true">https://community.m5stack.com/post/27016</guid><dc:creator><![CDATA[hriq105]]></dc:creator><pubDate>Mon, 11 Nov 2024 15:58:14 GMT</pubDate></item></channel></rss>