<?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[Can&#x27;t access M5 Paper touch screen in Arduino IDE.]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I'm trying to access the M5Paper touch screen though the arduino IDE, but it does not seem to be working.<br />
I've modified the example code:</p>
<pre><code>#include &lt;M5EPD.h&gt;

M5EPD_Canvas canvas(&amp;M5.EPD);

int point[2][2];

void setup()
{
    M5.begin();
    M5.EPD.SetRotation(90);
    M5.TP.SetRotation(90);
    M5.EPD.Clear(true);
    canvas.createCanvas(540, 960);
    canvas.setTextSize(5);
    canvas.drawString("Touch The Screen!", 20, 400);
    canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
Serial.begin(115200);
}

void loop()
{
Serial.println(M5.TP.avaliable());
    if(M5.TP.avaliable()){
        if(!M5.TP.isFingerUp()){
            M5.TP.update();
            canvas.fillCanvas(0);
            bool is_update = false;
            for(int i=0;i&lt;2; i++){
                tp_finger_t FingerItem = M5.TP.readFinger(i);
                if((point[i][0]!=FingerItem.x)||(point[i][1]!=FingerItem.y)){
                    is_update = true;
                    point[i][0] = FingerItem.x;
                    point[i][1] = FingerItem.y;
                    canvas.fillRect(FingerItem.x-50, FingerItem.y-50, 100, 100, 15);
                    Serial.printf("Finger ID:%d--&gt;X: %d*C  Y: %d  Size: %d\r\n", FingerItem.id, FingerItem.x, FingerItem.y , FingerItem.size);
                }
            }
            if(is_update)
            {
                canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
            }
        }
    }
}
</code></pre>
<p dir="auto">TP.available() seems to always return zero so none of the other code runs. Am I missing something?</p>
]]></description><link>https://community.m5stack.com/topic/3974/can-t-access-m5-paper-touch-screen-in-arduino-ide</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 05:07:30 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3974.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Jan 2022 20:44:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Tue, 18 Jul 2023 19:49:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a><br />
Followed your advice and got it to work.  Thanks very much!</p>
]]></description><link>https://community.m5stack.com/post/21616</link><guid isPermaLink="true">https://community.m5stack.com/post/21616</guid><dc:creator><![CDATA[kazooz.igloos]]></dc:creator><pubDate>Tue, 18 Jul 2023 19:49:36 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Sun, 16 Jul 2023 17:57:44 GMT]]></title><description><![CDATA[<p dir="auto">Hello @kazooz-igloos</p>
<p dir="auto">it looks like the fix for the constant crash/reboot has been committed into gitub after v0.1.4. Sorry for not catching that. I normally download the latest from main (ignoring tagged versions), extract the zip file manually and use that.</p>
<p dir="auto">That said, the relevant change to fix the crash should be this <a href="https://github.com/m5stack/M5EPD/commit/e181c3a3fc9cd83e5d78e038502ead55882b7c21" target="_blank" rel="noopener noreferrer nofollow ugc">one</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/21595</link><guid isPermaLink="true">https://community.m5stack.com/post/21595</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 16 Jul 2023 17:57:44 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Sun, 16 Jul 2023 17:12:06 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 />
Hi</p>
<p dir="auto">Thanks for the reply.</p>
<p dir="auto">i have made sure I updated everything so have M5EPD 0.1.4 and Arduino version 2.1.1 on Mac.</p>
<p dir="auto">When I compile and download the programme touch screen still doesn't work.</p>
<p dir="auto">The serial output is as follows:<br />
18:05:56.314 -&gt; M5EPD initializing...OK<br />
18:06:00.418 -&gt; M5EPD initializing...OK<br />
18:06:04.542 -&gt; M5EPD initializing...OK<br />
18:06:08.651 -&gt; M5EPD initializing...OK<br />
18:06:12.847 -&gt; M5EPD initializing...OK<br />
18:06:16.893 -&gt; M5EPD initializing...OK</p>
<p dir="auto">Any idea if the issue is with my setup or with my M5Paper.</p>
<p dir="auto">Thanks</p>
<p dir="auto">David</p>
]]></description><link>https://community.m5stack.com/post/21594</link><guid isPermaLink="true">https://community.m5stack.com/post/21594</guid><dc:creator><![CDATA[kazooz.igloos]]></dc:creator><pubDate>Sun, 16 Jul 2023 17:12:06 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Thu, 13 Jul 2023 16:31:44 GMT]]></title><description><![CDATA[<p dir="auto">Hello @kazooz-igloos</p>
<p dir="auto">above modifications should no longer be required as the necessary changes have been added into the current version found on github.</p>
<p dir="auto">About 5 month ago a <a href="https://github.com/m5stack/M5EPD/commit/e181c3a3fc9cd83e5d78e038502ead55882b7c21" target="_blank" rel="noopener noreferrer nofollow ugc">fix</a> was committed for an issue which caused the M5Paper to crash - so make sure you have the latest version from github.</p>
<p dir="auto">Using the latest <a href="https://github.com/m5stack/M5EPD" target="_blank" rel="noopener noreferrer nofollow ugc">M5EPD</a> source from github (w/o modifications) I was able to compile an run the TOUCH.ino example just fine.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/21564</link><guid isPermaLink="true">https://community.m5stack.com/post/21564</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Thu, 13 Jul 2023 16:31:44 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Thu, 13 Jul 2023 10:29:21 GMT]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">I am also having the same issue that I can't get the touch example to work.  On the factory test it needed to reboot a few times before the touch screen initialised.</p>
<p dir="auto">I tried changing the code as above in the gt911 but now my M5Paper keeps rebooting.</p>
<p dir="auto">Any advice?</p>
<p dir="auto">Regards</p>
<p dir="auto">David</p>
]]></description><link>https://community.m5stack.com/post/21562</link><guid isPermaLink="true">https://community.m5stack.com/post/21562</guid><dc:creator><![CDATA[kazooz.igloos]]></dc:creator><pubDate>Thu, 13 Jul 2023 10:29:21 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Sat, 29 Jan 2022 20:56:10 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/tamoorh" aria-label="Profile: tamoorh">@<bdi>tamoorh</bdi></a></p>
<p dir="auto">the same modifications should work just fine for platformIO as well.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16411</link><guid isPermaLink="true">https://community.m5stack.com/post/16411</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 29 Jan 2022 20:56:10 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Sat, 29 Jan 2022 18:49:26 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> Thank you so much for the response! This fixed it!<br />
Is this an error with only the Arduino IDE? Or are there other edits that have to be made if I used platformIO?</p>
]]></description><link>https://community.m5stack.com/post/16409</link><guid isPermaLink="true">https://community.m5stack.com/post/16409</guid><dc:creator><![CDATA[tamoorh]]></dc:creator><pubDate>Sat, 29 Jan 2022 18:49:26 GMT</pubDate></item><item><title><![CDATA[Reply to Can&#x27;t access M5 Paper touch screen in Arduino IDE. on Sat, 29 Jan 2022 08:50:33 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/tamoorh" aria-label="Profile: tamoorh">@<bdi>tamoorh</bdi></a></p>
<p dir="auto">The initialization of serial debug is already taken care of in <code>M5.begin()</code> - there is no need to add another <code>Serial.begin()</code>. I just mention that because I've seen cases where calling <code>Serial.begin()</code> twice caused some trouble.</p>
<p dir="auto">If you look into the function <code>M5.TP.available()</code> you'll see that there is a flag <code>gt911_irq_trigger</code> which is cleared every time the function is called. So if you call it twice in a row the second call will always return false.</p>
<p dir="auto">If you want to observe the available value you'll need to modify the code to only call the function once:</p>
<pre><code>  bool t = M5.TP.avaliable();
  Serial.println(t);
  if(t){
</code></pre>
<p dir="auto">That said, there seems to be an issue when compiling for arduino-esp32 2.0.X - I2C seems to have trouble to initialize. I was able to fix it by changing a few lines in the library function <code>GT911:begin()</code></p>
<pre><code>//  Wire.setClock(400000);
//  Wire.begin(pin_sda, pin_scl);
  Wire.begin((int) pin_sda, (int) pin_scl, 400000U);
</code></pre>
<p dir="auto">With the above change the touch example should run w/o any modifications.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/16398</link><guid isPermaLink="true">https://community.m5stack.com/post/16398</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 29 Jan 2022 08:50:33 GMT</pubDate></item></channel></rss>