<?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&#x27;s External Port A I2C Capability or Lack Thereof]]></title><description><![CDATA[<p dir="auto">I was pretty excited to see an external I2C port (G13 - SDA &amp; G15 - SCL) on the M5dial since it seems to act more like a self-contained smart sensor than a microcontroller. I figured this I2C port could potentially allow it to communicate with another micro-controller/computer allowing it to relay quite a bit of information along. However, I'm not really seeing a way to initialize and use this port for this purpose. Am I missing something here? I know the dial has an internal I2C port (G11 - SDA &amp; G12 - SCL) being used to read RFID, touch screen, and RTC functions. Does this interfere with having a second I2C bus open?</p>
]]></description><link>https://community.m5stack.com/topic/6114/m5dial-s-external-port-a-i2c-capability-or-lack-thereof</link><generator>RSS for Node</generator><lastBuildDate>Sun, 03 May 2026 17:25:29 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/6114.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Feb 2024 05:55:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Mon, 26 Feb 2024 05:04:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abraxas" aria-label="Profile: abraxas">@<bdi>abraxas</bdi></a> My Pleasure!<br />
-Terry</p>
]]></description><link>https://community.m5stack.com/post/24133</link><guid isPermaLink="true">https://community.m5stack.com/post/24133</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Mon, 26 Feb 2024 05:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Mon, 26 Feb 2024 02:30:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a> Thanks Teastain! I was looking into some esp-now examples but it was a bit of a struggle trying to figure out what is supposed to work. (A lot of examples and a lot of wrong ways to implement esp-now). Your code gave me the jump I needed. I was able to adapt your code to read Rfid tags and get cross talk happening! Thanks again!</p>
]]></description><link>https://community.m5stack.com/post/24132</link><guid isPermaLink="true">https://community.m5stack.com/post/24132</guid><dc:creator><![CDATA[Abraxas]]></dc:creator><pubDate>Mon, 26 Feb 2024 02:30:27 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Wed, 21 Feb 2024 07:33:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abraxas" aria-label="Profile: abraxas">@<bdi>abraxas</bdi></a> said in <a href="/post/23947">M5Dial's External Port A I2C Capability or Lack Thereof</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robski" aria-label="Profile: robski">@<bdi>robski</bdi></a> Not a bad idea but UART is located on pins G43 and G44 which are not broken out (Port B is G1 and G2). I might be able to use the USB C port but that's just a hassle and a half as far as prototyping, debugging, and expansion is concerned.</p>
</blockquote>
<p dir="auto">in theory you can reconfigure any port to work as uart</p>
]]></description><link>https://community.m5stack.com/post/23962</link><guid isPermaLink="true">https://community.m5stack.com/post/23962</guid><dc:creator><![CDATA[robski]]></dc:creator><pubDate>Wed, 21 Feb 2024 07:33:36 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Wed, 21 Feb 2024 01:38:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abraxas" aria-label="Profile: abraxas">@<bdi>abraxas</bdi></a> I keep a sample on my GitHub, here:<br />
<a href="https://github.com/teastainGit/ESP_NOWpeer2peer" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/teastainGit/ESP_NOWpeer2peer</a><br />
There is ONE sketch for TWO devices, you have to enter the MAC address of one, into the sketch of the other, and vice-versa.<br />
You will need to add the Dial library as required.<br />
If you have problems contact me at <a href="mailto:teastain@me.com" target="_blank" rel="noopener noreferrer nofollow ugc">teastain@me.com</a></p>
]]></description><link>https://community.m5stack.com/post/23958</link><guid isPermaLink="true">https://community.m5stack.com/post/23958</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Wed, 21 Feb 2024 01:38:45 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 23:24:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/teastain" aria-label="Profile: teastain">@<bdi>teastain</bdi></a> said in <a href="/post/23953">M5Dial's External Port A I2C Capability or Lack Thereof</a>:</p>
<blockquote>
<p dir="auto">ESP_NOW</p>
</blockquote>
<p dir="auto">No, mostly because I did not know this protocol existed. This looks like it could be a promising avenue. Thanks for the suggestion Teastain!</p>
]]></description><link>https://community.m5stack.com/post/23957</link><guid isPermaLink="true">https://community.m5stack.com/post/23957</guid><dc:creator><![CDATA[Abraxas]]></dc:creator><pubDate>Tue, 20 Feb 2024 23:24:36 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 21:56:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/abraxas" aria-label="Profile: abraxas">@<bdi>abraxas</bdi></a> Have you considered ESP_NOW?<br />
I no longer use cables, except for three inchers from the sensor!<br />
Dial, Stamps, Cores, AtomS3!<br />
It is amazing.</p>
]]></description><link>https://community.m5stack.com/post/23953</link><guid isPermaLink="true">https://community.m5stack.com/post/23953</guid><dc:creator><![CDATA[teastain]]></dc:creator><pubDate>Tue, 20 Feb 2024 21:56:52 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 19:22:37 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> said in <a href="/post/23949">M5Dial's External Port A I2C Capability or Lack Thereof</a>:</p>
<blockquote>
<p dir="auto">here</p>
</blockquote>
<p dir="auto">Your assumption is correct. From my understanding of I2C, it seems like an I2C bus should be able to support multiple masters on the same bus. And it should be possible to have a master receive information as long as it is not busy sending information.</p>
<p dir="auto">With that said, it was busy with the RFID peripheral so maybe that's the problem or I could be entirely mistaken all together on how I2C works. You've given me some documents to digest as well. So I'll get back to you with a new configuration hopefully soon. Thanks!</p>
]]></description><link>https://community.m5stack.com/post/23950</link><guid isPermaLink="true">https://community.m5stack.com/post/23950</guid><dc:creator><![CDATA[Abraxas]]></dc:creator><pubDate>Tue, 20 Feb 2024 19:22:37 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 17:16:42 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/abraxas" aria-label="Profile: Abraxas">@<bdi>Abraxas</bdi></a></p>
<p dir="auto">ok, now I understand. Well, one of the M5Dial needs to be an I2C master and the other needs to be an I2C slave. Right now, it seem to me, you're setting both M5Dials up as I2C master.</p>
<p dir="auto">Please check documentation <a href="https://docs.espressif.com/projects/esp-idf/en/stable/esp32s3/api-reference/peripherals/i2c.html" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> and <a href="https://docs.espressif.com/projects/arduino-esp32/en/latest/api/i2c.html#i2c-slave-mode" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/23949</link><guid isPermaLink="true">https://community.m5stack.com/post/23949</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 20 Feb 2024 17:16:42 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 16:48:14 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> Yes, I did hit an issue. I looked at your code but it seems to be looking at what's on the bus but the bus is not experiencing any real data traffic because the peripherals are not being used. I'm not really sure that it can be used as a true test of both internal and external bus capabilities.<br />
Below is some code I modified using M5stack's RFID example and added I2C communication.</p>
<pre><code>// Libraries to include
#include "M5Dial.h"

// Set up and initialize constants and variables
const byte MY_ADDRESS = 0x12;
const byte SLAVE_ADDRESS = 0x13;

String uid = "";
String oldUid = "";


void setup() 
{
    // Initialize dial rfid and screen
    auto cfg = M5.config();
    M5Dial.begin(cfg, false, true);
    M5Dial.Display.setTextColor(GREEN);
    M5Dial.Display.setTextDatum(middle_center);
    M5Dial.Display.setTextFont(&amp;fonts::Orbitron_Light_32);
    M5Dial.Display.setTextSize(1);
    M5Dial.Display.drawString("RFID Card", M5Dial.Display.width() / 2, M5Dial.Display.height() / 2);
    
    // Set up I2C address and recieve transmission event handling
    Wire.begin (MY_ADDRESS);
    Wire.onReceive (receiveEvent);
}

void loop() 
{
  // Find out if a card is available for reading
  if(M5Dial.Rfid.PICC_IsNewCardPresent() &amp;&amp; M5Dial.Rfid.PICC_ReadCardSerial()) 
  {
    uint8_t piccType = M5Dial.Rfid.PICC_GetType(M5Dial.Rfid.uid.sak);

    // Check to see if PICC is Classic MIFARE type
    if(piccType != MFRC522::PICC_TYPE_MIFARE_MINI &amp;&amp; piccType != MFRC522::PICC_TYPE_MIFARE_1K &amp;&amp; piccType != MFRC522::PICC_TYPE_MIFARE_4K) 
    {
      M5Dial.Display.clear();
      M5Dial.Display.drawString("no support", M5Dial.Display.width() / 2, M5Dial.Display.height() / 2);
      return; // bad card - loop done
    }

    // else get UID data
    uid = "";
    for(byte i = 0; i &lt; M5Dial.Rfid.uid.size; i++) 
    { 
        uid += String(M5Dial.Rfid.uid.uidByte[i], HEX);
    }
    
    // And output stored UID data to the screen if its a different card from the card scanned previously.
    if(uid != oldUid)
    {
      M5Dial.Display.clear();
      M5Dial.Speaker.tone(8000, 20);
      M5Dial.Display.drawString(M5Dial.Rfid.PICC_GetTypeName(piccType), M5Dial.Display.width() / 2, M5Dial.Display.height() / 2 - 30);
      M5Dial.Display.drawString("card id:", M5Dial.Display.width() / 2, M5Dial.Display.height() / 2);
      M5Dial.Display.drawString(uid, M5Dial.Display.width() / 2, M5Dial.Display.height() / 2 + 30);
      oldUid = uid;

      // Also send uid data to microcontroller
      Wire.beginTransmission(SLAVE_ADDRESS);
      Wire.write(uid.c_str());
      Wire.endTransmission();
    }
  }
}

// recieve and display UID data from another M5Dial
void receiveEvent(int tSize)
{
  uid = "";
  for(int i = 0; i &lt; tSize; i++)
  {
    uid += Wire.read();
  }
  M5Dial.Display.clear();
  M5Dial.Speaker.tone(8000, 20);
  M5Dial.Display.drawString("card id:", M5Dial.Display.width() / 2, M5Dial.Display.height() / 2);
  M5Dial.Display.drawString(uid, M5Dial.Display.width() / 2, M5Dial.Display.height() / 2 + 30);
  oldUid = uid;
}
</code></pre>
<p dir="auto">The code above can be copied over to another M5Dial and the addressing is just swapped. Theoretically it should work but when one dial receives RFID card data the other does not display this information. I think that it is transmitting this information but on the interior bus not the external bus. To fix this I added a line to my setup code to include the external I2C bus shown below:</p>
<pre><code>Wire.begin (13, 15);
</code></pre>
<p dir="auto">However that seemed to kill RFID functionality. And this is where I currently sit, hence the questions and comments above hoping for some help.</p>
]]></description><link>https://community.m5stack.com/post/23948</link><guid isPermaLink="true">https://community.m5stack.com/post/23948</guid><dc:creator><![CDATA[Abraxas]]></dc:creator><pubDate>Tue, 20 Feb 2024 16:48:14 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 15:58:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robski" aria-label="Profile: robski">@<bdi>robski</bdi></a> Not a bad idea but UART is located on pins G43 and G44 which are not broken out (Port B is G1 and G2). I might be able to use the USB C port but that's just a hassle and a half as far as prototyping, debugging, and expansion is concerned.</p>
]]></description><link>https://community.m5stack.com/post/23947</link><guid isPermaLink="true">https://community.m5stack.com/post/23947</guid><dc:creator><![CDATA[Abraxas]]></dc:creator><pubDate>Tue, 20 Feb 2024 15:58:21 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 11:24:16 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/abraxas" aria-label="Profile: Abraxas">@<bdi>Abraxas</bdi></a></p>
<p dir="auto">why are you saying that? Did you try to use the external port A for I2C and hit an issue?</p>
<p dir="auto">Please find an example <a href="https://github.com/felmue/MyM5StackExamples/blob/main/M5Dial/I2CScanIntExt/I2CScanIntExt.ino" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> which scans the internal and external I2C bus.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/23946</link><guid isPermaLink="true">https://community.m5stack.com/post/23946</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 20 Feb 2024 11:24:16 GMT</pubDate></item><item><title><![CDATA[Reply to M5Dial&#x27;s External Port A I2C Capability or Lack Thereof on Tue, 20 Feb 2024 08:16:34 GMT]]></title><description><![CDATA[<p dir="auto">maybe use UART functionality to communicate with another controller/computer</p>
]]></description><link>https://community.m5stack.com/post/23942</link><guid isPermaLink="true">https://community.m5stack.com/post/23942</guid><dc:creator><![CDATA[robski]]></dc:creator><pubDate>Tue, 20 Feb 2024 08:16:34 GMT</pubDate></item></channel></rss>