<?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[Scan using M5 Unified for IC2 devices for a M5Dial fails]]></title><description><![CDATA[<p dir="auto">I've an M5 Dial v1.0 (i.e., <a href="https://shop.m5stack.com/products/m5stamp-esp32s3-module" target="_blank" rel="noopener noreferrer nofollow ugc">https://shop.m5stack.com/products/m5stamp-esp32s3-module</a>) with a number of IC2 modules such as:</p>
<ul>
<li>Grove Temperature Sensor (<a href="https://www.seeedstudio.com/Grove-Temperature-Sensor.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.seeedstudio.com/Grove-Temperature-Sensor.html</a>)</li>
<li>Grove-Wio-E5 Wireless Module - STM32WLE5JC (<a href="https://www.seeedstudio.com/Grove-LoRa-E5-STM32WLE5JC-p-4867.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.seeedstudio.com/Grove-LoRa-E5-STM32WLE5JC-p-4867.html</a>)</li>
<li>Buzzer v1.3</li>
</ul>
<p dir="auto">I can't access the IC2 devices on port A or B using the M5 Unified library. Why? I'm using latest Arduino IDE on Windows 10 Pro, with latest libraries &amp; board files.</p>
<p dir="auto">Here's the code I'm testing with (partially from the M5 support AI) that runs "fine", but never detects a device connected via a M5 Grove cable to port A (G15 = SCL, G13 = SDA) or B (G1 = SCL, G2 = SDA).</p>
<pre><code>#include &lt;M5Unified.h&gt;

// Use M5Dial's external I2C bus (Port A pins 15=SCL, 13=SDA)
#define SCAN_BUS m5::Ex_I2C

// (Port B uses 21=SCL, 22=SDA per Copilot) - or rather G1 = SCL and G2= SDA per M5Dial documentation)
// Port B can be used as an alternative I2C bus
// #define SCAN_BUS m5::Ex_I2C_PortB

// to scan the M5 Dial's internal ports, use m5::I2C
// #define SCAN_BUS m5::I2C

void setup()
{
    // Initialize M5Dial with default configuration
    auto cfg = M5.config();
    M5.begin(cfg);

    // Configure round display for I2C scanner
    M5.Display.setTextSize(2);
    M5.Display.setTextColor(TFT_WHITE, TFT_BLACK);
    // M5.Display.fillScreen(TFT_BLACK);
    M5.Display.setCursor(20, 60);
    M5.Display.println("M5Dial I2C Scanner");
    M5.Display.drawLine(20, 50, 220, 50, TFT_WHITE);
}

void loop()
{
    M5.update();

    M5.Display.setCursor(20, 80);
    M5.Display.println("Scanning bus...");

    byte address;
    int nDevices = 0;
    int yPos = 120;

    // Scan all valid I2C addresses (0x08 to 0x77)
    for (address = 1; address &lt; 127; address++)
    {
        // Skip reserved addresses 0-7 to prevent bus lockups
        if (address &lt; 8)
            continue;

        // display progress indicator, every 4 addresses
        if (address % 4 == 0)
        {
            M5.Display.setCursor(50, 100);
            M5.Display.printf("Scanning: %d, 0x%02X", address, address);
            M5.update();
            delay(75); // brief delay to allow display update
        }

        // Use M5Unified's built-in scanID method for reliable detection
        bool deviceFound = SCAN_BUS.scanID(address);

        if (deviceFound)
        {
            M5.Display.setCursor(20, yPos);
            M5.Display.printf("0x%02X", address);
            Serial.printf("Device %d is at address 0x%02X\n", nDevices, address);
            delay(2000);
            nDevices++;
            yPos += 25;
            if (yPos &gt; 210)
                break; // Stop if we run out of screen space
        }
    }

    // Show scan summary
    M5.Display.setCursor(20, 180);
    if (nDevices == 0)
    {
        M5.Display.println("No devices found");
        Serial.println("No I2C devices found");
    }
    else
    {
        M5.Display.printf("%d device(s) found", nDevices);
        Serial.printf("Successfully found %d I2C devices\n", nDevices);
    }

    // Wait for button press to rescan
    M5.Display.setCursor(20, 200);
    M5.Display.println("Press BtnA: rescan");
    while (!M5.BtnA.wasPressed())
    {
        M5.update();
        delay(10);
    }
    M5.Display.fillScreen(TFT_BLACK);
    M5.Display.setCursor(20, 80);
    M5.Display.println("M5Dial I2C Scanner");
    M5.Display.drawLine(20, 50, 220, 50, TFT_WHITE);
}
</code></pre>
<p dir="auto">I presume M5Dial handles the required pull-up voltage on the pins.</p>
<p dir="auto">Other things to check?  I don't have other M5 devices, but lots of XIAO trinkets...</p>
]]></description><link>https://community.m5stack.com/topic/7955/scan-using-m5-unified-for-ic2-devices-for-a-m5dial-fails</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 14:12:35 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7955.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Dec 2025 02:57:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Scan using M5 Unified for IC2 devices for a M5Dial fails on Sat, 20 Dec 2025 09:25:30 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/vashjuan" aria-label="Profile: VashJuan">@<bdi>VashJuan</bdi></a></p>
<p dir="auto">well, it looks to me that none of the listed devices are actually I2C devices.</p>
<ul>
<li>Grove Temp. Sensor: has an analog out pin (the other is NC) which means it directly sends an analog value</li>
<li>Grove Wireless Mod: has RX and TX which means it has an UART interface</li>
<li>Buzzer: well, my guess would be that it is not I2C either</li>
</ul>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/30332</link><guid isPermaLink="true">https://community.m5stack.com/post/30332</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 20 Dec 2025 09:25:30 GMT</pubDate></item></channel></rss>