<?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[UIFLOW V2.3.9]]></title><description><![CDATA[<p dir="auto"><strong>Hi there,</strong></p>
<p dir="auto">I'm trying to setup a small HMI on a Tab5 (latest firmware, V2.3.9).<br />
Now I want to add buttons with 2 separate images for ON/OFF state.<br />
The picture is drawn very slowly on screen. In operation I wanted to use set image flag hidden true/ false, but this also is very slow.<br />
Pictures are PNG, 225x225px, ~30kB.<br />
I think there must be a problem with M5UI (LVGL): if I use the same pictures/ procedures with M5GFX it works very fast/ smooth. But in M5GFX I can't find sliders?<br />
Any hint's tipps how to do it?</p>
<p dir="auto">Thanks!<br />
Kind regards,<br />
Stephan</p>
<p dir="auto"><a href="https://photos.app.goo.gl/1MBJuYzGmZsESiqc6" target="_blank" rel="noopener noreferrer nofollow ugc">Video showing the problem</a></p>
]]></description><link>https://community.m5stack.com/topic/7960/uiflow-v2-3-9</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 06:02:08 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7960.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Dec 2025 00:10:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UIFLOW V2.3.9 on Sat, 27 Dec 2025 12:23:55 GMT]]></title><description><![CDATA[<p dir="auto">If you feel like the canvas method is too much effort - especially if it part of a larger project or you prefer M5GFX - then here is a working switch in M5GFX:</p>
<pre><code>import os, sys, io
import M5
from M5 import *
import time



Switch1 = None
Switch2 = None
Switch3 = None
Knob = None


state = None
touch = None

# Describe this function...
def Off():
  global state, touch, Switch1, Switch2, Switch3, Knob
  state = 0
  Knob.setCursor(x=145, y=119)
  Switch1.setColor(color=0x999999, fill_c=0x999999)
  Switch2.setColor(color=0x999999, fill_c=0x999999)
  Knob.setColor(color=0xffffff, fill_c=0xffffff)

# Describe this function...
def On():
  global state, touch, Switch1, Switch2, Switch3, Knob
  state = 1
  Knob.setCursor(x=174, y=119)
  Switch2.setColor(color=0x33ccff, fill_c=0x33ccff)
  Switch3.setColor(color=0x33ccff, fill_c=0x33ccff)
  Knob.setColor(color=0xffffff, fill_c=0xffffff)


def setup():
  global Switch1, Switch2, Switch3, Knob, state, touch

  M5.begin()
  Widgets.setRotation(1)
  Widgets.fillScreen(0x222222)
  Switch1 = Widgets.Circle(174, 119, 14, 0xa4a4a4, 0xa4a4a4)
  Switch2 = Widgets.Rectangle(145, 105, 28, 28, 0xa4a4a4, 0xa4a4a4)
  Switch3 = Widgets.Circle(145, 119, 14, 0xa4a4a4, 0xa4a4a4)
  Knob = Widgets.Circle(145, 119, 14, 0xffffff, 0xffffff)

  Off()


def loop():
  global Switch1, Switch2, Switch3, Knob, state, touch
  M5.update()
  touch = M5.Touch.getCount()
  if touch != 0:
    if (M5.Touch.getX()) &gt;= 131 and (M5.Touch.getX()) &lt;= 188 and (M5.Touch.getY()) &gt;= 105 and (M5.Touch.getY()) &lt;= 133:
      if state == 0:
        On()
      else:
        Off()
      time.sleep_ms(500)


if __name__ == '__main__':
  try:
    setup()
    while True:
      loop()
  except (Exception, KeyboardInterrupt) as e:
    try:
      from utility import print_error_msg
      print_error_msg(e)
    except ImportError:
      print("please update to latest firmware")

</code></pre>
]]></description><link>https://community.m5stack.com/post/30364</link><guid isPermaLink="true">https://community.m5stack.com/post/30364</guid><dc:creator><![CDATA[RPI25]]></dc:creator><pubDate>Sat, 27 Dec 2025 12:23:55 GMT</pubDate></item><item><title><![CDATA[Reply to UIFLOW V2.3.9 on Sat, 27 Dec 2025 11:41:31 GMT]]></title><description><![CDATA[<p dir="auto">I have tried to recreate your image here in this code.</p>
<pre><code>page0 = None
switch0 = None
canvas0 = None

def setup():
  global page0, switch0, canvas0

  M5.begin()
  Widgets.setRotation(1)
  m5ui.init()
  page0 = m5ui.M5Page(bg_c=0xffffff)
  switch0 = m5ui.M5Switch(x=130, y=184, w=60, h=30, bg_c=0xe7e3e7, bg_c_checked=0x2196f3, circle_c=0xffffff, parent=page0)
  canvas0 = m5ui.M5Canvas(x=5, y=5, w=310, h=150, color_format=lv.COLOR_FORMAT.ARGB8888, bg_c=0xffffff, bg_opa=255, parent=page0)

  page0.screen_load()


def loop():
  global page0, switch0, canvas0
  M5.update()
  if (switch0.has_state(lv.STATE.CHECKED)) == False:
    canvas0.draw_arc(155, 75, 50, color=0xc0c0c0, opa=255, width=15, start_angle=300, end_angle=240)
    canvas0.draw_line(155, 20, 155, 75, color=0xc0c0c0, opa=255, width=20)
  else:
    canvas0.draw_arc(155, 75, 50, color=0x33cc00, opa=255, width=15, start_angle=300, end_angle=240)
    canvas0.draw_line(155, 20, 155, 75, color=0x33cc00, opa=255, width=20)

</code></pre>
]]></description><link>https://community.m5stack.com/post/30363</link><guid isPermaLink="true">https://community.m5stack.com/post/30363</guid><dc:creator><![CDATA[RPI25]]></dc:creator><pubDate>Sat, 27 Dec 2025 11:41:31 GMT</pubDate></item><item><title><![CDATA[Reply to UIFLOW V2.3.9 on Sat, 27 Dec 2025 11:31:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/amani4791" aria-label="Profile: Amani4791">@<bdi>Amani4791</bdi></a> As far as I can see, using a Core S3:<br />
When I use M5UI I get the same results: the picture loads slowly.<br />
With M5GFX: There aren't any touchscreen elements. So to have a switch, you would have to make one custom.<br />
To do what you are trying to do, I would recommend using a canvas and a switch from M5UI and just manually creating the shapes in the canvas using code because that will make the draw process on the screen much faster.<br />
Hope that helps,<br />
RPi</p>
]]></description><link>https://community.m5stack.com/post/30362</link><guid isPermaLink="true">https://community.m5stack.com/post/30362</guid><dc:creator><![CDATA[RPI25]]></dc:creator><pubDate>Sat, 27 Dec 2025 11:31:37 GMT</pubDate></item></channel></rss>