<?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[Wake up on pick-up]]></title><description><![CDATA[<p dir="auto">Is there any way to program StickC to wake up when it moved eg. picked up? Maybe some behavior from the IMU waking up deep sleep? I'm open for anything.</p>
]]></description><link>https://community.m5stack.com/topic/2039/wake-up-on-pick-up</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 05:48:47 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2039.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Jun 2020 16:26:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 27 Jan 2021 07:08:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/doublep" aria-label="Profile: doublep">@<bdi>doublep</bdi></a> hello, could you refer me to where you read that value from?</p>
]]></description><link>https://community.m5stack.com/post/12047</link><guid isPermaLink="true">https://community.m5stack.com/post/12047</guid><dc:creator><![CDATA[Zontex]]></dc:creator><pubDate>Wed, 27 Jan 2021 07:08:13 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Mon, 25 Jan 2021 15:46:46 GMT]]></title><description><![CDATA[<p dir="auto">Does anyone know what the trigger values of registers ACCEL_WOM_THR represent? For example, for the ADXL345, 1 LSB of trigger register is the equalavent of 0.065 G. However, there is no information about this in the datasheet  of the MPU6886 and the value also seem to be effected by setting a different value for A_DLPF_CFG in the ACCEL_CONFIG_2 register.</p>
<p dir="auto">If anyone can help with this that would be nice.</p>
]]></description><link>https://community.m5stack.com/post/11994</link><guid isPermaLink="true">https://community.m5stack.com/post/11994</guid><dc:creator><![CDATA[doublep]]></dc:creator><pubDate>Mon, 25 Jan 2021 15:46:46 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Mon, 07 Sep 2020 16:54:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto">Just a heads up on the new M5Core2 which has the IMU and mic on a micro board attached to the M5bus. As far as I can tell the interrupt pin of the MPU6886 doesn't seem to be connected to GPIO35 or any other pin on the M5bus which is a bit disappointing.</p>
<p dir="auto">Cheers<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/9988</link><guid isPermaLink="true">https://community.m5stack.com/post/9988</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 07 Sep 2020 16:54:27 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 26 Aug 2020 18:51:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/tristar" aria-label="Profile: Tristar">@<bdi>Tristar</bdi></a></p>
<p dir="auto">The daughter board with MPU6886 and BMM150 are the same for M5Stack Gray and Fire. So the picture I've attached to my previous post (#15) also applies for M5Stack Gray.</p>
<p dir="auto">Good luck!<br />
Felix</p>
<p dir="auto">P.S. you'll find the same information also through the link in my signature below.</p>
]]></description><link>https://community.m5stack.com/post/9849</link><guid isPermaLink="true">https://community.m5stack.com/post/9849</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 26 Aug 2020 18:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 26 Aug 2020 12:38:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a><br />
yeah, you are right. On the M5Stack Grey there is no wiring between the pins. Could you provide some images of the board where one can see how you did the soldering? time to rip my m5stack grey open and do some soldering too :)</p>
<p dir="auto">For the next version of the M5Stack there has definitelyto be a wiring between the IMU (mpu9250) and a pin like 35!!</p>
]]></description><link>https://community.m5stack.com/post/9843</link><guid isPermaLink="true">https://community.m5stack.com/post/9843</guid><dc:creator><![CDATA[Tristar]]></dc:creator><pubDate>Wed, 26 Aug 2020 12:38:32 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Fri, 21 Aug 2020 09:37:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/davesee" aria-label="Profile: davesee">@<bdi>davesee</bdi></a></p>
<p dir="auto">Thank you very much for your WOM code which I am using on my M5Stack Fire.</p>
<p dir="auto">Just curious about the following code lines for WOM step 2:</p>
<ul>
<li>The read regdata are not actually used. Maybe by mistake?</li>
<li>Comment says 32 samples, but actually only 16 samples are selected. Typo?</li>
</ul>
<pre><code>/*
Step 2: Set Accelerometer LPF bandwidth to 218.1 Hz
        • In ACCEL_CONFIG2 register (0x1D) set ACCEL_FCHOICE_B = 0 and A_DLPF_CFG[2:0] = 1 (b001)
*/
I2C_Read_NBytes(MPU6886_ADDRESS, MPU6886_ACCEL_CONFIG2, 1, &amp;regdata);
regdata = 0b00100001; // average 32 samples, use 218 Hz DLPF
I2C_Write_NBytes(MPU6886_ADDRESS, MPU6886_ACCEL_CONFIG2, 1, &amp;regdata);
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/9782</link><guid isPermaLink="true">https://community.m5stack.com/post/9782</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 21 Aug 2020 09:37:13 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 19 Aug 2020 16:25:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/tristar" aria-label="Profile: Tristar">@<bdi>Tristar</bdi></a></p>
<p dir="auto">How's it going? My two M5Stack Gray and Fire did exactly the same, they would restart on their own. The reason is, as we already expected, that the interrupt output from the MPU6886 is not connected to the GPIO35 (at least not in my two M5Stacks).</p>
<p dir="auto">I've fixed that by soldering a wire from MPU6886 pin12 (INT) to GPIO35 and now my M5Stacks properly go to sleep and only wakes up on motion again.</p>
<p dir="auto"><img src="/assets/uploads/files/1597849447347-m5stackfire_mpu6886_int.png" alt="0_1597849398440_M5StackFire_MPU6886_INT.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Cheers<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/9749</link><guid isPermaLink="true">https://community.m5stack.com/post/9749</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Wed, 19 Aug 2020 16:25:28 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Tue, 11 Aug 2020 22:01:51 GMT]]></title><description><![CDATA[<p dir="auto">Not yet, but I will invest tomorrow the whole day and try to get his example working on the GREY.<br />
I have the problem that the GREY just restarts on its own every few seconds. Looks like the GPIO35 is always triggering the wake up call from deep sleep.</p>
]]></description><link>https://community.m5stack.com/post/9624</link><guid isPermaLink="true">https://community.m5stack.com/post/9624</guid><dc:creator><![CDATA[Tristar]]></dc:creator><pubDate>Tue, 11 Aug 2020 22:01:51 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Tue, 11 Aug 2020 19:40:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tristar" aria-label="Profile: Tristar">@<bdi>Tristar</bdi></a></p>
<p dir="auto">Just curious - how did your try out go? Have you been able to get <a class="plugin-mentions-user plugin-mentions-a" href="/user/davesee" aria-label="Profile: davesee">@<bdi>davesee</bdi></a> code running on your M5Stack Grey?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/9622</link><guid isPermaLink="true">https://community.m5stack.com/post/9622</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 11 Aug 2020 19:40:19 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Thu, 06 Aug 2020 11:45:20 GMT]]></title><description><![CDATA[<p dir="auto">hey <a class="plugin-mentions-user plugin-mentions-a" href="/user/davesee" aria-label="Profile: davesee">@<bdi>davesee</bdi></a></p>
<p dir="auto">I have the latest version of the M5Stack gray, but the board also reads 2018.3. I am going to try out your code that you used for M5StickC on my M5Stack Gray with PlatformIO.</p>
<p dir="auto">I will report back how it went. All I want is a wake up on movement :). The same thing you got running on your M5StickC.</p>
]]></description><link>https://community.m5stack.com/post/9600</link><guid isPermaLink="true">https://community.m5stack.com/post/9600</guid><dc:creator><![CDATA[Tristar]]></dc:creator><pubDate>Thu, 06 Aug 2020 11:45:20 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Mon, 03 Aug 2020 22:43:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/davesee" aria-label="Profile: davesee">@<bdi>davesee</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/tristar" aria-label="Profile: Tristar">@<bdi>Tristar</bdi></a></p>
<p dir="auto">In my M5Stack Grey the two ICs (MPU6886 and BMM150) are on a small daughter board which was soldered to the underside of the Groove connector (GND, 5V, SDA, SCK). An additional pin  provides 3.3V for the two ICs. But I am afraid the interrupt line coming out of the MPU6886 is not connected at all.</p>
<p dir="auto">Please note: My M5Stack Grey board reads 2018.3, so maybe the daughter board was merged with the main board in later revisions?</p>
<p dir="auto">Felix</p>
<p dir="auto">Desoldered daughter board:</p>
<p dir="auto"><img src="/assets/uploads/files/1596493893018-m5stack_mpu6886_bmm150_board.png" alt="0_1596493891171_M5Stack_MPU6886_BMM150_board.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/9576</link><guid isPermaLink="true">https://community.m5stack.com/post/9576</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 03 Aug 2020 22:43:22 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Mon, 03 Aug 2020 16:11:01 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/tristar" aria-label="Profile: tristar">@<bdi>tristar</bdi></a> !</p>
<p dir="auto">TL; DR - maybe. It depends if the interrupt line is wired between MPU6886 and ESP32.</p>
<p dir="auto">There are two questions to answer to know if this method will work with the M5-Grey:</p>
<ol>
<li>Does it have the MPU6886?<br />
A: Yes!</li>
<li>Is the interrupt line coming out of the MPU6886 wired in to one of the ESP32 pins that can be used to wake from deep sleep?<br />
A: Unsure. This isn't clearly outlined in the schematic here: <a href="https://docs.m5stack.com/#/en/core/gray" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/#/en/core/gray</a></li>
</ol>
<p dir="auto">I wrote some library code to enable this on the M5StickC which is now included in the latest Arduino library here:<br />
<a href="https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp#L101" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5StickC/blob/master/src/utility/MPU6886.cpp#L101</a></p>
<p dir="auto">I'm happy to suggest or review code so you can test this. Are you using the actual Arduino IDE or something different? It should be straightforward to test with a development version of the library either way.</p>
<p dir="auto">Cheers,<br />
Dave</p>
]]></description><link>https://community.m5stack.com/post/9574</link><guid isPermaLink="true">https://community.m5stack.com/post/9574</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Mon, 03 Aug 2020 16:11:01 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Thu, 30 Jul 2020 23:12:55 GMT]]></title><description><![CDATA[<p dir="auto">Hey davesee,<br />
do you think that your code could be easily changed so your example could work on a M5Stack Grey?</p>
<p dir="auto">I want the M5Stack Grey to be in deep sleep and when it's moved (movement should be detected by the IMU) it should wake up.</p>
<p dir="auto">greetings</p>
]]></description><link>https://community.m5stack.com/post/9520</link><guid isPermaLink="true">https://community.m5stack.com/post/9520</guid><dc:creator><![CDATA[Tristar]]></dc:creator><pubDate>Thu, 30 Jul 2020 23:12:55 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Mon, 06 Jul 2020 05:38:06 GMT]]></title><description><![CDATA[<p dir="auto">Just an update: here's an example of waking the unit from deep sleep with the MPU6886:<br />
<a href="https://gist.github.com/standarddeviant/85c31cf34eb51e10aa3bb02dcd0bcbd1" target="_blank" rel="noopener noreferrer nofollow ugc">https://gist.github.com/standarddeviant/85c31cf34eb51e10aa3bb02dcd0bcbd1</a></p>
<p dir="auto">I'm working on adding this capability to the arduino library so it's simpler to include this functionality in existing sketches.</p>
<p dir="auto">Cheers!</p>
]]></description><link>https://community.m5stack.com/post/9248</link><guid isPermaLink="true">https://community.m5stack.com/post/9248</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Mon, 06 Jul 2020 05:38:06 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 01 Jul 2020 20:45:24 GMT]]></title><description><![CDATA[<p dir="auto">Here's a video of that Arduino sketch in action. <a href="https://www.youtube.com/watch?v=v5GpsvjFsEw" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.youtube.com/watch?v=v5GpsvjFsEw</a></p>
<p dir="auto">Cheers!</p>
]]></description><link>https://community.m5stack.com/post/9222</link><guid isPermaLink="true">https://community.m5stack.com/post/9222</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Wed, 01 Jul 2020 20:45:24 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 01 Jul 2020 16:26:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo" aria-label="Profile: jhfoo">@<bdi>jhfoo</bdi></a> I have something working pretty well. I put an Arduino .ino file here:<br />
<a href="https://gist.github.com/standarddeviant/ea0b7f12a32bf5de96992a8ef350351d" target="_blank" rel="noopener noreferrer nofollow ugc">https://gist.github.com/standarddeviant/ea0b7f12a32bf5de96992a8ef350351d</a></p>
<p dir="auto">Please be aware, this doesn't (yet) wake up the main processor - it's just a proof of concept to validate that approach #1 will work - and it does!</p>
<p dir="auto">What that sketch does is</p>
<ul>
<li>Initializes the MPU6886 similar to other arduino examples</li>
<li>Attaches a simple interrupt when pin 35 is <code>RISING</code> using the <code>attachInterrupt</code> Arduino function.
<ul>
<li>this interrupt currently just increments a variable of how many times it's been called</li>
</ul>
</li>
<li>Sets registers on the MPU6886 to enable "wake-on-motion". I had to dig through the datasheet for some of these details and one detail in particular was just plain wrong, but that's how it goes sometimes. :-)</li>
</ul>
<p dir="auto">On the display, there are two numbers - one is just a seconds counter and the other is how many times motion has been detected via GPIO pin 35 from the MPU6886. There's a simple rectangle on the LCD display. When motion is detected, that rectangle stays red for two seconds. After those two seconds, the rectangle goes back to blue.</p>
<p dir="auto">I'm going to reach out to the maintainers of the M5StickC library to see if this functionality can be included directly in the library - it should be pretty straightforward to include this capability and would simplify using this ability for others. I'll post a video soon showing this sketch in action.</p>
<p dir="auto">The sleep/wake functionality is the next step - this Arduino sketch is just a proof-of-concept for the simpler approach #1. Since it's just writing registers over I2C and setting up an external interrupt, this same approach should work with Micropython.</p>
<p dir="auto">Cheers,<br />
Dave</p>
]]></description><link>https://community.m5stack.com/post/9220</link><guid isPermaLink="true">https://community.m5stack.com/post/9220</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Wed, 01 Jul 2020 16:26:34 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 01 Jul 2020 13:29:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo" aria-label="Profile: jhfoo">@<bdi>jhfoo</bdi></a> I got my M5Stick-C and I can confirm that option #1 does work with an Arduino sketch. It should also work with Micropython but I haven't tested that yet. I'm working on tweaking the settings to get good performance which just means:</p>
<ol>
<li>Minimize false alarms - i.e. the 'wake-on-motion' doesn't trigger when there's no real movement</li>
<li>Maximize true alarms - i.e. the 'wake-on-motion' does trigger when there's real movement</li>
</ol>
<p dir="auto">I'll post an arduino sketch somewhere when it works. If I can get it to work well, I think it would be a nice addition to the M5StickC arduino library. This would simplify using it for most people. Getting this to work with Micropython should be straightforward once the Arduino version is working well. More to come!</p>
]]></description><link>https://community.m5stack.com/post/9217</link><guid isPermaLink="true">https://community.m5stack.com/post/9217</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Wed, 01 Jul 2020 13:29:11 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Fri, 26 Jun 2020 01:12:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo" aria-label="Profile: jhfoo">@<bdi>jhfoo</bdi></a> When you say "wake up", do you mean "wake up" the processor from a low-power state? This is my interest so that I can increase battery life.</p>
<p dir="auto">I see two ways to do this:</p>
<ol>
<li>If <code>GPIO35</code> is connected properly from the <code>MPU6886</code>, then it's a matter of configuring the <code>MPU6886</code> properly in an arduino sketch or micropython code.</li>
<li>If <code>GPIO35</code> is NOT connected properly from the <code>MPU6886</code>, then there might a much more difficult solution for arduino or micropython. The ESP32 has a special capability known as the "ULP" core where "ULP" means "Ultra Low Power". This is an advanced topic and not simple, but there's enough documentation and examples online that it should be possible.</li>
</ol>
<p dir="auto">It might be a while, but when I get my M5Stick-C, I plan to try approach 1, and potentially approach 2.</p>
<h3>Boring details below re: approach 2:</h3>
<p dir="auto">Approach 2 involves writing assembly code for the ULP core. It looks like Arduino and MicroPython both have the ability to run code on the ULP core AND do a "deep sleep". The ULP core can read registers over I2C. So approach 2. requires the following steps:</p>
<ol>
<li>Initialize I2C pins like normal, but ALSO for ULP registers, so it knows the pins to use for reading I2C - it's effectively a separate CPU core that can share some memory with the main cores.</li>
<li>Initialize I2C peripheral address (i.e. I2C address of MPU6886) by setting registers for the ULP</li>
<li>Read accelerometer registers for X, Y, and Z and calculate energy or change of energy in ULP assembly code.</li>
<li>If that energy  or change of energy is past a threshold, the ULP will call the 'WAKE' command to wake up the main ESP32 processor.</li>
</ol>
<p dir="auto">That's a lot to get working well. Let's hope approach #1 can work! :-)</p>
]]></description><link>https://community.m5stack.com/post/9107</link><guid isPermaLink="true">https://community.m5stack.com/post/9107</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Fri, 26 Jun 2020 01:12:42 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 17 Jun 2020 17:42:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/davesee" aria-label="Profile: davesee">@<bdi>davesee</bdi></a> I heard about setting a flag on movement detected, written at the C level. Hoping to avoid that level of coding. Will forward your link to my (volunteer) team who do C coding if they can confirm your design.</p>
]]></description><link>https://community.m5stack.com/post/9039</link><guid isPermaLink="true">https://community.m5stack.com/post/9039</guid><dc:creator><![CDATA[jhfoo]]></dc:creator><pubDate>Wed, 17 Jun 2020 17:42:41 GMT</pubDate></item><item><title><![CDATA[Reply to Wake up on pick-up on Wed, 17 Jun 2020 17:26:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jhfoo" aria-label="Profile: jhfoo">@<bdi>jhfoo</bdi></a> I'm hoping to do exactly this. I'm also hoping to get a bite on this thread re: the new MPU6886 IMU: <a href="https://forum.m5stack.com/topic/1400/unable-to-wake-m5stickc-using-sh200q-s-activity-interrupt" target="_blank" rel="noopener noreferrer nofollow ugc">https://forum.m5stack.com/topic/1400/unable-to-wake-m5stickc-using-sh200q-s-activity-interrupt</a></p>
]]></description><link>https://community.m5stack.com/post/9037</link><guid isPermaLink="true">https://community.m5stack.com/post/9037</guid><dc:creator><![CDATA[davesee]]></dc:creator><pubDate>Wed, 17 Jun 2020 17:26:57 GMT</pubDate></item></channel></rss>