<?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[Core2 Factory Test]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I got some challenges with the Core2 Factory Test:</p>
<ul>
<li>If Core2 init started, it didn't detect the four I2C-devices. If I inserted a call of<br />
"scani2caddr" before "checkI2cAddr" every thing worked fine.</li>
<li>In the main view there are five icons on the bottom. On the far left is an image icon. If I touch the image icon, all five icons disappear and nothing else happens. Is this normal?<br />
I didn't find a video with using this misterious image icon.</li>
</ul>
]]></description><link>https://community.m5stack.com/topic/2316/core2-factory-test</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Apr 2026 10:25:26 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/2316.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Sep 2020 14:34:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Core2 Factory Test on Thu, 24 Sep 2020 22:10:23 GMT]]></title><description><![CDATA[<p dir="auto">In another thread, it became clear that the most appropriate fix for this issue in the factory test code is:<br />
On lines 446 and 447, in the function <code>checkI2cAddr()</code>:<br />
Change one instance of <code>Wire.</code> to  <code>Wire1.</code> one each of the two lines.</p>
<pre><code>        Wire.beginTransmission( lastptr-&gt;addr );
        if ( Wire.endTransmission() == 0 )
</code></pre>
<p dir="auto">...becomes:</p>
<pre><code>        Wire1.beginTransmission( lastptr-&gt;addr );
        if ( Wire1.endTransmission() == 0 )
</code></pre>
]]></description><link>https://community.m5stack.com/post/10193</link><guid isPermaLink="true">https://community.m5stack.com/post/10193</guid><dc:creator><![CDATA[vkichline]]></dc:creator><pubDate>Thu, 24 Sep 2020 22:10:23 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 Factory Test on Mon, 21 Sep 2020 05:04:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys,</p>
<p dir="auto">thank you very much for your great help.</p>
<p dir="auto">I used my time to analyse the code and the image icon started</p>
<pre><code>   drawJPEGImageFromSDCard(SD,"/image")
</code></pre>
<p dir="auto">and this procedure read all JPG-Files in the subdirectory "image".<br />
It is like a slideshow and it worked fine.</p>
<p dir="auto">I like to post an issue in github to solve the problem with I2C, but there<br />
was <a href="https://github.com/m5stack/M5-ProductExampleCodes/issues/25" target="_blank" rel="noopener noreferrer nofollow ugc">issue 25</a></p>
]]></description><link>https://community.m5stack.com/post/10150</link><guid isPermaLink="true">https://community.m5stack.com/post/10150</guid><dc:creator><![CDATA[sheepDog]]></dc:creator><pubDate>Mon, 21 Sep 2020 05:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 Factory Test on Sun, 20 Sep 2020 23:21:06 GMT]]></title><description><![CDATA[<p dir="auto">Hi guys</p>
<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4057">@vkichline</a> : interesting. I guess your hack makes <code>Wire</code> releasing the clock and data lines and that allows <code>Wire1</code> to work properly.</p>
<p dir="auto">Another way to fix the issue (I think, not tested) without touching the libraries could be the following change in <code>Core2_Factory_test.ino</code>:</p>
<p dir="auto">current code:</p>
<pre><code>M5.begin(true, true, true, true);
</code></pre>
<p dir="auto">modified code:</p>
<pre><code>M5.begin(true, true, true, false);
</code></pre>
<p dir="auto">with the last parameter set to <code>false</code> <code>Wire</code> doesn't get initialised and <code>Wire1</code> should work properly.</p>
<p dir="auto">But yes, I fully agree, the issue should be properly resolved in the libraries. Hopefully we'll see those issues cleared up soon.</p>
<p dir="auto">Felix</p>
]]></description><link>https://community.m5stack.com/post/10147</link><guid isPermaLink="true">https://community.m5stack.com/post/10147</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 20 Sep 2020 23:21:06 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 Factory Test on Sun, 20 Sep 2020 21:32:29 GMT]]></title><description><![CDATA[<p dir="auto">Without modifying the M5Core2 library, I found a bit of "magic" that fixes the factory test sketch, although I cannot explain exactly why it works!<br />
In Core2_Factory_test.ino, at line 439 you will find <code>checkI2cAddr()</code>. This is the function which is failing.<br />
If you insert a begin/end transmission before the do loop, it works.<br />
Considering Felix's comments, I suppose this somehow invokes a reinitialization of the I2C interface. Or something.<br />
I was experimenting, trying to see if I could scan the bus at this point in the code. It turned out I could, and the problem was fixed as a side effect.<br />
I reduced it to the minimum code needed, shown below.<br />
Fixing the library is the <strong>right</strong> way to go, but I assume there will be a flurry of library updates at some point soon, and your changes may be lost.</p>
<pre><code>int checkI2cAddr()
{
    // HACKHACK: It fails unless I do this. Can be any address. PFM.
    Wire.beginTransmission(1);
    Wire.endTransmission();
    
    uint8_t count = 0;
    i2cDevice_t *lastptr = &amp;i2cParentptr;
    do{
        lastptr = lastptr-&gt;nextPtr;
        ...
</code></pre>
<p dir="auto">I hope this helps.</p>
]]></description><link>https://community.m5stack.com/post/10146</link><guid isPermaLink="true">https://community.m5stack.com/post/10146</guid><dc:creator><![CDATA[vkichline]]></dc:creator><pubDate>Sun, 20 Sep 2020 21:32:29 GMT</pubDate></item><item><title><![CDATA[Reply to Core2 Factory Test on Sun, 20 Sep 2020 17:33:18 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/88">@sheepDog</a></p>
<p dir="auto">the M5Core2 library initialises two i2c instances (<code>Wire</code> and <code>Wire1</code>) using the same pins (21 and 22) and that leads to collisions. Have a look at the following pull-request which changes the pins for  <code>Wire</code> making <code>Wire1</code> work.</p>
<p dir="auto"><a href="https://github.com/m5stack/M5Core2/pull/3/files" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Core2/pull/3/files</a></p>
<p dir="auto">As for the far left icon: I think if you insert an SD card with pictures on it you'll be able to view them through that icon. I have not tried that myself though so I might be wrong.</p>
<p dir="auto">Cheers<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/10145</link><guid isPermaLink="true">https://community.m5stack.com/post/10145</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 20 Sep 2020 17:33:18 GMT</pubDate></item></channel></rss>