<?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[M5Dial  TFT_eSPI pinout]]></title><description><![CDATA[<p dir="auto">Does anyone know the correct pin assignment for the M5Dial SPI bus? I am trying to run LVGL with TFT_eSPI. I have tried the pin assignments I obtained from the M5Dial specifications page but I am having no luck. Here is what I have so far</p>
<p dir="auto">// For ESP32 Dev board (only tested with GC9A01 display)<br />
// The hardware SPI can be mapped to any pins</p>
<p dir="auto">#define TFT_MOSI 5  // In some display driver board, it might be written as "SDA" and so on.<br />
#define TFT_SCLK 6<br />
#define TFT_CS   7  // Chip select control pin<br />
#define TFT_DC   4 // Data Command control pin<br />
#define TFT_RST  8 // Reset pin (could connect to Arduino RESET pin)<br />
#define TFT_BL   9  // LED back-light</p>
]]></description><link>https://community.m5stack.com/topic/5737/m5dial-tft_espi-pinout</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 00:06:37 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5737.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Oct 2023 21:06:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Sun, 09 Feb 2025 14:23:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/228365">@SadE54</a> I believe it is.</p>
]]></description><link>https://community.m5stack.com/post/28157</link><guid isPermaLink="true">https://community.m5stack.com/post/28157</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Sun, 09 Feb 2025 14:23:38 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Wed, 05 Feb 2025 14:05:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/60211">@gordsh</a>  Do you think with the lvgl m5dial setup , that Squareline Studio is usable ?</p>
]]></description><link>https://community.m5stack.com/post/28126</link><guid isPermaLink="true">https://community.m5stack.com/post/28126</guid><dc:creator><![CDATA[SadE54]]></dc:creator><pubDate>Wed, 05 Feb 2025 14:05:54 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Mon, 20 Jan 2025 13:25:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/60211">@gordsh</a> in your code, is the press function working successfully?<br />
i am getting crashes for now,  i am trying to use the button as a external button and not as a encoder button, the main problems seems to be init of button</p>
]]></description><link>https://community.m5stack.com/post/27957</link><guid isPermaLink="true">https://community.m5stack.com/post/27957</guid><dc:creator><![CDATA[mukul_100_]]></dc:creator><pubDate>Mon, 20 Jan 2025 13:25:25 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Fri, 17 Jan 2025 13:56:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/60211">@gordsh</a> thanks for sending, I actually don't know eez studio at all, I have never used it..</p>
]]></description><link>https://community.m5stack.com/post/27928</link><guid isPermaLink="true">https://community.m5stack.com/post/27928</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Fri, 17 Jan 2025 13:56:13 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Fri, 17 Jan 2025 11:45:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/60211">@gordsh</a> Oh great thanks a lot, I actually got it working,<br />
and after seeing your code i tried to implement the button part with encoder but the dial seems to crash repeatedly because of it.  For now that is not my focus so i will try it again later.<br />
Also , do you have any idea how the implementation of encoder is eez studio is.<br />
i understood that the group is to be made but didnt quite understand how to append/impelment the encoder events to it<br />
If anyone has any idea or reference, Thank you in advance.</p>
<p dir="auto">also this is the code for how i implemented the button press with encoder</p>
<pre><code>// Encoder read function
void encoder_read(lv_indev_drv_t *drv, lv_indev_data_t *data) {
    long newPosition = M5Dial.Encoder.read() / 4; // Normalize encoder position
    if (newPosition != oldPosition) {
        int encoderDiff = newPosition - oldPosition;
        oldPosition = newPosition;

        // React to encoder rotation
        if (encoderDiff &gt; 0) {
            lv_group_focus_next(group);
        } else if (encoderDiff &lt; 0) {
            lv_group_focus_prev(group);
        }
    }

    // Check button press
    if (M5Dial.BtnA.wasPressed()) {
        data-&gt;state = LV_INDEV_STATE_PR;
        Serial.println("M5.BtnA Pressed");
    } else {
        data-&gt;state = LV_INDEV_STATE_REL;
    }
}

// Display flush function
void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p) {
    uint32_t width = (area-&gt;x2 - area-&gt;x1 + 1);
    uint32_t height = (area-&gt;y2 - area-&gt;y1 + 1);

    M5.Display.startWrite();
    M5.Display.setAddrWindow(area-&gt;x1, area-&gt;y1, width, height);
    M5.Display.pushPixels((uint16_t *)&amp;color_p-&gt;full, width * height, true);
    M5.Display.endWrite();

    lv_disp_flush_ready(disp);
}

void setup() {
    auto cfg = M5.config();
    M5Dial.begin(cfg, true, false);
    Serial.begin(115200);

    // LVGL initialization
    lv_init();
    lv_disp_draw_buf_init(&amp;drawBuffer, buffer, NULL, SCREEN_WIDTH * SCREEN_HEIGHT / 10);

    static lv_disp_drv_t disp_drv;
    lv_disp_drv_init(&amp;disp_drv);
    disp_drv.hor_res = SCREEN_WIDTH;
    disp_drv.ver_res = SCREEN_HEIGHT;
    disp_drv.flush_cb = my_disp_flush;
    disp_drv.draw_buf = &amp;drawBuffer;
    lv_disp_drv_register(&amp;disp_drv);

    static lv_indev_drv_t encoder_drv;
    lv_indev_drv_init(&amp;encoder_drv);
    encoder_drv.type = LV_INDEV_TYPE_ENCODER;
    encoder_drv.read_cb = encoder_read;
    encoder_indev = lv_indev_drv_register(&amp;encoder_drv);

    // Create a group and assign it to the encoder input device
    group = lv_group_create();
    lv_indev_set_group(encoder_indev, group);

    // Create focusable widgets
    lv_obj_t *btn1 = lv_btn_create(lv_scr_act());
    lv_obj_align(btn1, LV_ALIGN_CENTER, -60, 0);
    lv_obj_t *label1 = lv_label_create(btn1);
    lv_label_set_text(label1, "Button 1");

    lv_obj_t *btn2 = lv_btn_create(lv_scr_act());
    lv_obj_align(btn2, LV_ALIGN_CENTER, 60, 0);
    lv_obj_t *label2 = lv_label_create(btn2);
    lv_label_set_text(label2, "Button 2");

    lv_obj_t *btn3 = lv_btn_create(lv_scr_act());
    lv_obj_align(btn3, LV_ALIGN_CENTER, 0, 50);
    lv_obj_t *label3 = lv_label_create(btn3);
    lv_label_set_text(label3, "Button 3");

    // Add widgets to the group
    lv_group_add_obj(group, btn1);
    lv_group_add_obj(group, btn2);
    lv_group_add_obj(group, btn3);
}
</code></pre>
]]></description><link>https://community.m5stack.com/post/27926</link><guid isPermaLink="true">https://community.m5stack.com/post/27926</guid><dc:creator><![CDATA[mukul_100_]]></dc:creator><pubDate>Fri, 17 Jan 2025 11:45:54 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Fri, 17 Jan 2025 00:01:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/131598">@mukul_100_</a>  Here is a small demo of the M5Dial with touch and LVGL. Hope this helps and sorry for the delay.</p>
<p dir="auto"><a href="https://www.dropbox.com/scl/fi/7reg508p66oxkgvnxmcfw/M5DialLVGLTouchDemo.ino?rlkey=54m9e5zf2qhb02abubm7r1dvd&amp;st=3up5wrg0&amp;dl=0" target="_blank" rel="noopener noreferrer nofollow ugc">M5DialLVGLTouchDemo.ino</a></p>
<p dir="auto"><img src="/assets/uploads/files/1737072109937-unnamed-resized.jpg" alt="unnamed.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/27925</link><guid isPermaLink="true">https://community.m5stack.com/post/27925</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Fri, 17 Jan 2025 00:01:54 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Thu, 16 Jan 2025 22:31:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/131598">@mukul_100_</a> I did get this working, I am having a different issue now but I will send you a small demo program that I wrote using LVGL with touch.</p>
]]></description><link>https://community.m5stack.com/post/27924</link><guid isPermaLink="true">https://community.m5stack.com/post/27924</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Thu, 16 Jan 2025 22:31:45 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Wed, 08 Jan 2025 12:10:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/131598">@mukul_100_</a> Got this workking by using m5unified instead of tft_espi<br />
But i can get the touch to work<br />
as per what i read lvgl uses polling to get the touch coordinates using lv_timer_handler();</p>
<p dir="auto">but i dont understand how to implement M5Dial.Touch.getDetail(); to get the touch</p>
]]></description><link>https://community.m5stack.com/post/27811</link><guid isPermaLink="true">https://community.m5stack.com/post/27811</guid><dc:creator><![CDATA[mukul_100_]]></dc:creator><pubDate>Wed, 08 Jan 2025 12:10:30 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Tue, 07 Jan 2025 12:37:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/60211">@gordsh</a> Hi ,<br />
did you get this working ?<br />
I am banging my head against the wall with this one right now ,<br />
I am trying to use EEZ Studio with M5dial and using <a href="http://platform.io" target="_blank" rel="noopener noreferrer nofollow ugc">platform.io</a> (or arduino ide whichever works)</p>
<p dir="auto">also if you have the file of user_setup.h for GC9A01. kindly share<br />
Thank You</p>
]]></description><link>https://community.m5stack.com/post/27791</link><guid isPermaLink="true">https://community.m5stack.com/post/27791</guid><dc:creator><![CDATA[mukul_100_]]></dc:creator><pubDate>Tue, 07 Jan 2025 12:37:40 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Fri, 27 Oct 2023 19:42:12 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>, thanks very much, This worked perfectly.</p>
]]></description><link>https://community.m5stack.com/post/22596</link><guid isPermaLink="true">https://community.m5stack.com/post/22596</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Fri, 27 Oct 2023 19:42:12 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Fri, 27 Oct 2023 17:56:08 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/60211">@gordsh</a></p>
<p dir="auto">re <strong>TFT_eSPI</strong> : try adding the following define in <code>Setup200_GC9A01.h</code></p>
<pre><code>#define TFT_BACKLIGHT_ON HIGH
</code></pre>
<p dir="auto">re <strong>GC9A01_demo</strong> : please find an M5Dial version <a href="https://github.com/felmue/MyM5StackExamples/blob/main/M5Dial/GC9A01_demo/GC9A01_demo.ino" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/22594</link><guid isPermaLink="true">https://community.m5stack.com/post/22594</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Fri, 27 Oct 2023 17:56:08 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Wed, 25 Oct 2023 13:24:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> said in <a href="/post/22576">M5Dial TFT_eSPI pinout</a>:</p>
<blockquote>
<p dir="auto">M5</p>
</blockquote>
<p dir="auto">Thank you.</p>
]]></description><link>https://community.m5stack.com/post/22580</link><guid isPermaLink="true">https://community.m5stack.com/post/22580</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Wed, 25 Oct 2023 13:24:17 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Wed, 25 Oct 2023 05:02:06 GMT]]></title><description><![CDATA[<p dir="auto">This is the Micropython code I used to get a basic "Hello World" working.</p>
<pre><code>import os, sys, io
import M5
from M5 import *

label0 = None

def setup():
  global label0

  M5.begin()
  label0 = Widgets.Label("label", 50, 100, 1.0, 0xffffff, 0x222222, Widgets.FONTS.DejaVu18)

  label0.setCursor(x=50, y=100)
  label0.setText(str('Hello World'))
  label0.setVisible(True)

def loop():
  global label0
  M5.update()

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/22576</link><guid isPermaLink="true">https://community.m5stack.com/post/22576</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 25 Oct 2023 05:02:06 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Wed, 25 Oct 2023 00:51:54 GMT]]></title><description><![CDATA[<p dir="auto">Can any one get this simple GC9A01 test to run on the M5Dial</p>
<ul>
<li><a href="https://github.com/carlfriess/GC9A01_demo" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/carlfriess/GC9A01_demo</a></li>
</ul>
<p dir="auto">My goal is to have LVGL running on the M5Dial so I am working my way through the display issues at this time.</p>
]]></description><link>https://community.m5stack.com/post/22572</link><guid isPermaLink="true">https://community.m5stack.com/post/22572</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Wed, 25 Oct 2023 00:51:54 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Tue, 24 Oct 2023 22:02:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> said in <a href="/post/22568">M5Dial TFT_eSPI pinout</a>:</p>
<blockquote>
<p dir="auto">GC9A01 driver</p>
</blockquote>
<p dir="auto">Hmm, no I did not. Let me do some research and try to find the driver</p>
]]></description><link>https://community.m5stack.com/post/22571</link><guid isPermaLink="true">https://community.m5stack.com/post/22571</guid><dc:creator><![CDATA[gordsh]]></dc:creator><pubDate>Tue, 24 Oct 2023 22:02:36 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial  TFT_eSPI pinout on Tue, 24 Oct 2023 05:13:36 GMT]]></title><description><![CDATA[<p dir="auto">Have you added the GC9A01 driver?</p>
]]></description><link>https://community.m5stack.com/post/22568</link><guid isPermaLink="true">https://community.m5stack.com/post/22568</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 24 Oct 2023 05:13:36 GMT</pubDate></item></channel></rss>