<?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[Unit QRCode suddenly stuck in Manual Scanning and doesn&#x27;t read QR-Codes anymore]]></title><description><![CDATA[<p dir="auto">I have a M5Stack CoreS3 and want to connect the <a href="https://docs.m5stack.com/en/unit/Unit-QRCode" target="_blank" rel="noopener noreferrer nofollow ugc">Unit QRCode</a> to it. At first everything worked well by just using the example code from Github.</p>
<pre><code>/*
 * SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
 *
 * SPDX-License-Identifier: MIT
 */

/**
 * @file i2c_mode.ino
 * @brief Unit QRCode I2C Mode Example
 * @version 0.2
 * @date 2024-06-19
 *
 *
 * @Hardwares: M5Core + Unit QRCode
 * @Platform Version: Arduino M5Stack Board Manager v2.1.0
 * @Dependent Library:
 * M5Unified: https://github.com/m5stack/M5Unified
 * M5GFX: https://github.com/m5stack/M5GFX
 * M5UnitQRCode: https://github.com/m5stack/M5Unit-QRCode
 */

#include &lt;M5Unified.h&gt;
#include &lt;M5GFX.h&gt;
#include "M5UnitQRCode.h"

M5Canvas canvas(&amp;M5.Display);

M5UnitQRCodeI2C qrcode;

#define I2C_AUTO_SCAN_MODE

void setup() {
    M5.begin();

    canvas.setColorDepth(1);  // mono color
    canvas.createSprite(M5.Display.width(), M5.Display.height());
    canvas.setTextSize((float)canvas.width() / 160);
    canvas.setTextScroll(true);

    Wire.begin(9,8); // Port B
    while (!qrcode.begin(&amp;Wire, UNIT_QRCODE_ADDR, 21, 22, 100000U)) {
        canvas.println("Unit QRCode I2C Init Fail");
        Serial.println("Unit QRCode I2C Init Fail");
        canvas.pushSprite(0, 0);
        delay(1000);
    }

    canvas.println("Unit QRCode I2C Init Success");
    Serial.println("Unit QRCode I2C Init Success");
#ifdef I2C_AUTO_SCAN_MODE
    canvas.println("Auto Scan Mode");
    canvas.pushSprite(0, 0);
    qrcode.setTriggerMode(AUTO_SCAN_MODE);
#else
    canvas.println("Manual Scan Mode");
    canvas.pushSprite(0, 0);
    qrcode.setTriggerMode(MANUAL_SCAN_MODE);
#endif
}

void loop() {
    if (qrcode.getDecodeReadyStatus() == 1) {
        uint8_t buffer[512] = {0};
        uint16_t length     = qrcode.getDecodeLength();
        Serial.printf("len:%d\r\n", length);
        qrcode.getDecodeData(buffer, length);
        Serial.printf("decode data:");
        for (int i = 0; i &lt; length; i++) {
            Serial.printf("%c", buffer[i]);
            canvas.printf("%c", buffer[i]);
        }
        Serial.println();
        canvas.println();
        canvas.pushSprite(0, 0);
    }
#ifndef I2C_AUTO_SCAN_MODE
    M5.update();
    if (M5.BtnA.wasPressed()) {
        // start scan
        qrcode.setDecodeTrigger(1);
    }
    if (M5.BtnB.wasPressed()) {
        // stop scan
        qrcode.setDecodeTrigger(0);
    }
#endif
}
</code></pre>
<p dir="auto">just had to add the Wire.begin(9,8) line.</p>
<p dir="auto">When I first plugged the scanner in, it was automatically in Auto Scan Mode and it worked fine, but all of a sudden (I can't remember if I did anything to cause this, sry) the unit only scans when I hit the trigger button and I can't read the codes anymore.</p>
<p dir="auto">Maybe I just need to do a factory reset of the scanner, but I wasn't able to find information on that.</p>
<p dir="auto">Would really appreciate your help!</p>
]]></description><link>https://community.m5stack.com/topic/7682/unit-qrcode-suddenly-stuck-in-manual-scanning-and-doesn-t-read-qr-codes-anymore</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 06:21:49 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7682.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Jul 2025 12:38:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unit QRCode suddenly stuck in Manual Scanning and doesn&#x27;t read QR-Codes anymore on Thu, 05 Feb 2026 12:41:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi, I encountered a similar issue. When the QR code reader is in auto-scan mode, if the barcode is scanned more than once while the main program is in a delay state (e.g., 5000 ms), the barcode reader stops responding after the delay ends, and the data can no longer be read. I also tried reading the barcode from the image in the previous post, but nothing changed.<br />
Additionally, I have confirmed that communication is restored and the device becomes usable again by unplugging and reconnecting the I2C cable. Is it possible to reset the barcode reader programmatically?</p>
]]></description><link>https://community.m5stack.com/post/30592</link><guid isPermaLink="true">https://community.m5stack.com/post/30592</guid><dc:creator><![CDATA[sk-ys]]></dc:creator><pubDate>Thu, 05 Feb 2026 12:41:53 GMT</pubDate></item><item><title><![CDATA[Reply to Unit QRCode suddenly stuck in Manual Scanning and doesn&#x27;t read QR-Codes anymore on Mon, 14 Jul 2025 14:39:06 GMT]]></title><description><![CDATA[<p dir="auto">Solved it, just had to scan this QR Code<br />
<a href="https://community.m5stack.com/assets/uploads/files/1742537195503-bad5272e-aaac-47df-857b-c6d130524d36-image.png">https://community.m5stack.com/assets/uploads/files/1742537195503-bad5272e-aaac-47df-857b-c6d130524d36-image.png</a></p>
]]></description><link>https://community.m5stack.com/post/29484</link><guid isPermaLink="true">https://community.m5stack.com/post/29484</guid><dc:creator><![CDATA[ThronKatze0]]></dc:creator><pubDate>Mon, 14 Jul 2025 14:39:06 GMT</pubDate></item></channel></rss>