<?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[StickC - SH200Q Acceleration Range]]></title><description><![CDATA[<p dir="auto">How to init the acceleration range to 16g for Sh200q on StickC with the MicroPython code?</p>
]]></description><link>https://community.m5stack.com/topic/1051/stickc-sh200q-acceleration-range</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 23:33:35 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1051.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Jun 2019 03:27:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Mon, 03 Feb 2020 14:20:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zhufu86" aria-label="Profile: zhufu86">@<bdi>zhufu86</bdi></a> Hey, I came along to look for python support for the sh200q. Seems that you use it in python with the hardware module.<br />
May sound stupid but I'm unsure where to find the module... (Very new to m5Stick / m5Stack) I am using the m5Stick.</p>
<p dir="auto">Best regards,<br />
klaas</p>
]]></description><link>https://community.m5stack.com/post/7298</link><guid isPermaLink="true">https://community.m5stack.com/post/7298</guid><dc:creator><![CDATA[khz]]></dc:creator><pubDate>Mon, 03 Feb 2020 14:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Tue, 04 Jun 2019 06:16:10 GMT]]></title><description><![CDATA[<p dir="auto">I know, it a bug..., will fix it</p>
]]></description><link>https://community.m5stack.com/post/4521</link><guid isPermaLink="true">https://community.m5stack.com/post/4521</guid><dc:creator><![CDATA[heybin]]></dc:creator><pubDate>Tue, 04 Jun 2019 06:16:10 GMT</pubDate></item><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Tue, 04 Jun 2019 06:10:59 GMT]]></title><description><![CDATA[<pre><code class="language-python">@property
def acceleration(self):
    so = self._accel_so
    data = self._regThreeShort(0x00)
    return tuple([round(value / so, 3) for value in data])
</code></pre>
<p dir="auto">output data is not  raw data, and ACCEL_FS_SEL_16G only measuring range, does not affect the value of acceleration</p>
]]></description><link>https://community.m5stack.com/post/4520</link><guid isPermaLink="true">https://community.m5stack.com/post/4520</guid><dc:creator><![CDATA[heybin]]></dc:creator><pubDate>Tue, 04 Jun 2019 06:10:59 GMT</pubDate></item><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Tue, 04 Jun 2019 02:38:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zhufu86" aria-label="Profile: zhufu86">@<bdi>zhufu86</bdi></a></p>
<p dir="auto">Finally, I had it solved.</p>
<p dir="auto">It seems I need to write the correct configuration into the SH200Q register manually.</p>
<p dir="auto"><img src="/assets/uploads/files/1559615581606-8a54c136-0046-4424-b9d2-026b230adbd8-image.png" alt="0_1559615580846_8a54c136-0046-4424-b9d2-026b230adbd8-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Here is how to....</p>
<pre><code>MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on M5Stack with ESP32
Type "help()" for more information.
&gt;&gt;&gt; from hardware import sh200q
&gt;&gt;&gt; imu = sh200q.Sh200q(accel_fs=sh200q.ACCEL_FS_SEL_16G)
&gt;&gt;&gt; imu.acceleration[0]
4.332
&gt;&gt;&gt; imu.i2c.readfrom_mem(108,0x16,1)
b'\x10'
&gt;&gt;&gt; imu.i2c.writeto_mem(108,0x16,'\x12')
1
&gt;&gt;&gt; imu.acceleration[0]
1.086
&gt;&gt;&gt;
</code></pre>
<p dir="auto">Is it a bug in module "hardware.sh200q"?</p>
]]></description><link>https://community.m5stack.com/post/4517</link><guid isPermaLink="true">https://community.m5stack.com/post/4517</guid><dc:creator><![CDATA[zhufu86]]></dc:creator><pubDate>Tue, 04 Jun 2019 02:38:55 GMT</pubDate></item><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Mon, 03 Jun 2019 13:19:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zhufu86" aria-label="Profile: zhufu86">@<bdi>zhufu86</bdi></a> said in <a href="/post/4511">StickC - SH200Q Acceleration Range</a>:</p>
<blockquote>
<p dir="auto">imu._accel_so=8192</p>
</blockquote>
<p dir="auto">Update...<br />
No matter how I initiate SH200Q, I can not get the range larger than 4g.<br />
Need more investigation.</p>
]]></description><link>https://community.m5stack.com/post/4513</link><guid isPermaLink="true">https://community.m5stack.com/post/4513</guid><dc:creator><![CDATA[zhufu86]]></dc:creator><pubDate>Mon, 03 Jun 2019 13:19:19 GMT</pubDate></item><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Mon, 03 Jun 2019 05:36:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zhufu86" aria-label="Profile: zhufu86">@<bdi>zhufu86</bdi></a> said in <a href="/post/4510">StickC - SH200Q Acceleration Range</a>:</p>
<blockquote>
<p dir="auto">imu = sh200q.Sh200q(accel_fs=sh200q.ACCEL_FS_SEL_16G)</p>
</blockquote>
<p dir="auto">I tried the codes in the StickC and got the acceleration value four times as big as the value before. So I suppose SH200Q is initiated  with 4g range if lack of accel_fs setting.<br />
For temporary solution I devide the returned acceleration value by 4.</p>
<pre><code>  x = imu.acceleration[0]/4
  y = imu.acceleration[1]/4
  z = imu.acceleration[2]/4
</code></pre>
<p dir="auto">I also did some tests as below.  No clue...</p>
<pre><code>&gt;&gt;&gt; imu = sh200q.Sh200q()
&gt;&gt;&gt; imu._accel_so
8192
&gt;&gt;&gt; imu.acceleration[2]
0.995
&gt;&gt;&gt; imu = sh200q.Sh200q(accel_fs=sh200q.ACCEL_FS_SEL_16G)
&gt;&gt;&gt; imu._accel_so
2048
&gt;&gt;&gt; imu.acceleration[2]
4.058
&gt;&gt;&gt; imu.acceleration[2]/4
0.9985
&gt;&gt;&gt; imu._accel_so=8192
&gt;&gt;&gt; imu.acceleration[2]
0.999
&gt;&gt;&gt;
</code></pre>
]]></description><link>https://community.m5stack.com/post/4511</link><guid isPermaLink="true">https://community.m5stack.com/post/4511</guid><dc:creator><![CDATA[zhufu86]]></dc:creator><pubDate>Mon, 03 Jun 2019 05:36:15 GMT</pubDate></item><item><title><![CDATA[Reply to StickC - SH200Q Acceleration Range on Mon, 03 Jun 2019 04:53:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zhufu86" aria-label="Profile: zhufu86">@<bdi>zhufu86</bdi></a></p>
<p dir="auto">I tried the code blow.  But I don't know whether it is correct.</p>
<pre><code>from hardware import sh200q
imu = sh200q.Sh200q(accel_fs=sh200q.ACCEL_FS_SEL_16G)
</code></pre>
]]></description><link>https://community.m5stack.com/post/4510</link><guid isPermaLink="true">https://community.m5stack.com/post/4510</guid><dc:creator><![CDATA[zhufu86]]></dc:creator><pubDate>Mon, 03 Jun 2019 04:53:42 GMT</pubDate></item></channel></rss>