<?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[Problems using lvgl with touchscreen]]></title><description><![CDATA[<p dir="auto">I ported the lvgl8 arduino to my core2 today, it can run the lvgl_demo_benchmark in 39fps, the touch was fuction too.<br />
Then I tried to put the lvglhandler into a task by freertos (it was in loop before), with priority 3. It worked as well.</p>
<p dir="auto">So I put some other task in my code, the first one is a blink (by using m5.apx.setled and vtaskdelay), It worked too. Then I tested it with demos of benchmark, music and widgets. And blink task, lvgl and touch fuction were all normal.</p>
<p dir="auto">Seems everything went well, I changed the blink task into serial.println sth per 1s. Then I tested those 3 demos again, I found that the serial task worked well, lvgl worked well, but the touch funtion didn't worked. The serial task is sending thing every seconds normally, but i cant move the screen by touching in those demos, lvgl is working cus in benchmark demo, every tests is going but i cant move the screen to see the marks at the end of the demo.</p>
<p dir="auto">So I try change the task back to blink, the touch function again. Seems it's sth about serial affect the touch function? But i dont know why.<br />
Part of my code:</p>
<p dir="auto"><em><strong>Task of blink or serial:</strong></em></p>
<p dir="auto">void Taskblink( void *pvParameters )<br />
{<br />
for(;;)<br />
{<br />
M5.Axp.SetLed(1);<br />
vTaskDelay(800);<br />
M5.Axp.SetLed(0);<br />
vTaskDelay(800);<br />
// Serial.println("i'm good..");<br />
// vTaskDelay(1000);<br />
}<br />
}</p>
<p dir="auto"><em><strong>Task of lvglhandler:</strong></em></p>
<p dir="auto">void Tasklvglhandler( void <em>pvParameters )<br />
{<br />
for(;;)<br />
{<br />
lv_timer_handler();  /</em> let the GUI do its work */<br />
vTaskDelay(5);<br />
}<br />
}</p>
<p dir="auto"><em><strong>lvgl touchpad read recall</strong></em><br />
void my_touchpad_read( lv_indev_drv_t * indev_driver, lv_indev_data_t * data )<br />
{<br />
TouchPoint_t coordinate;<br />
M5.Touch.getPressPoint();</p>
<pre><code>if (!M5.Touch.ispressed()){
    data-&gt;state = LV_INDEV_STATE_REL;
} else {
    data-&gt;state = LV_INDEV_STATE_PR;
    /*Set the coordinates*/
    coordinate = M5.Touch.getPressPoint();
    data-&gt;point.x = coordinate.x;
    data-&gt;point.y = coordinate.y;
}
</code></pre>
<p dir="auto">}</p>
<p dir="auto">Thanks for helping.</p>
]]></description><link>https://community.m5stack.com/topic/3666/problems-using-lvgl-with-touchscreen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 17:53:47 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3666.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Oct 2021 14:48:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problems using lvgl with touchscreen on Sat, 23 Oct 2021 10:48:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> Thank you, I've learn a lot from it</p>
]]></description><link>https://community.m5stack.com/post/15216</link><guid isPermaLink="true">https://community.m5stack.com/post/15216</guid><dc:creator><![CDATA[Forairaaaaa]]></dc:creator><pubDate>Sat, 23 Oct 2021 10:48:45 GMT</pubDate></item><item><title><![CDATA[Reply to Problems using lvgl with touchscreen on Fri, 22 Oct 2021 11:37:39 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/13064">@Forairaaaaa</a></p>
<p dir="auto">have you seen this <a href="https://forum.m5stack.com/topic/3613/how-to-run-lvgl-on-m5stack" target="_blank" rel="noopener noreferrer nofollow ugc">posting</a>?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/15205</link><guid isPermaLink="true">https://community.m5stack.com/post/15205</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 22 Oct 2021 11:37:39 GMT</pubDate></item></channel></rss>