<?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[Can I use the RFID Unit with the Grove interface on M5Camera?]]></title><description><![CDATA[<p dir="auto">I am trying to use RFID Unit (<a href="https://docs.m5stack.com/#/en/unit/rfid" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.m5stack.com/#/en/unit/rfid</a>) connected to M5Camera.<br />
But it ’s not working.<br />
Can M5Camera use RFID Unit?</p>
<p dir="auto">I use Wire library and MFRC522 library.</p>
<h3>easy example:</h3>
<pre><code class="language-c">MFRC522 mfrc522 (0x28);

Wire.begin ();
mfrc522.PCD_Init (); // No return
</code></pre>
<h3>Supplement:</h3>
<ul>
<li>I2C scan was performed but i2c device was not found.</li>
<li>I confirmed that it was connected correctly.</li>
<li>The RFID Unit is operating when connected to M5Stack Gray.</li>
</ul>
]]></description><link>https://community.m5stack.com/topic/1333/can-i-use-the-rfid-unit-with-the-grove-interface-on-m5camera</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 06:48:30 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1333.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Sep 2019 11:19:01 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can I use the RFID Unit with the Grove interface on M5Camera? on Thu, 17 Oct 2019 07:58:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/iwasada" aria-label="Profile: iwasada">@<bdi>iwasada</bdi></a> of course it can use RFID Unit</p>
]]></description><link>https://community.m5stack.com/post/6023</link><guid isPermaLink="true">https://community.m5stack.com/post/6023</guid><dc:creator><![CDATA[m5stack]]></dc:creator><pubDate>Thu, 17 Oct 2019 07:58:39 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use the RFID Unit with the Grove interface on M5Camera? on Thu, 10 Oct 2019 01:53:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a><br />
In the first place, I want to know if M5Camera is a specification that can use RFID Unit.<br />
I think there is no problem.</p>
]]></description><link>https://community.m5stack.com/post/5889</link><guid isPermaLink="true">https://community.m5stack.com/post/5889</guid><dc:creator><![CDATA[iwasada]]></dc:creator><pubDate>Thu, 10 Oct 2019 01:53:29 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use the RFID Unit with the Grove interface on M5Camera? on Wed, 25 Sep 2019 06:07:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a><br />
Thank you for the sample. However, I also confirmed this sample.</p>
<p dir="auto">Once again, I will post what I tried based on this sample.<br />
M5.begin () and M5.Power.begin () are recognitions that are unnecessary in M5Camera. When enabled and execed, it stopped at the log "M5Stack Initialize ..".Therefore, comment outed.</p>
<pre><code class="language-c">#include &lt;Wire.h&gt;
#include "MFRC522_I2C.h"
#include &lt;M5Stack.h&gt;

// 0x28 is i2c address on SDA. Check your address with i2cscanner if not match.
MFRC522 mfrc522 (0x28); // Create MFRC522 instance.

void setup () {
  //M5.begin ();
  //M5.Power.begin ();

  Serial.begin (115200); // Initialize serial communications with the PC
  Wire.begin (); // Initialize I2C

  Serial.println (F ("PCD_Init () Start"));
  mfrc522.PCD_Init (); // Init MFRC522
  Serial.println (F ("PCD_Init () Finish"));
  ShowReaderDetails (); // Show details of PCD-MFRC522 Card Reader details
  Serial.println (F ("Scan PICC to see UID, type, and data blocks ..."));
}

void loop () {
  // Look for new cards, and select one if present
  if (! mfrc522.PICC_IsNewCardPresent () ||! mfrc522.PICC_ReadCardSerial ()) {
    delay (50);
    return;
  }

  // Now a card is selected.The UID and SAK is in mfrc522.uid.

  // Dump UID
  Serial.print (F ("Card UID:"));
  for (byte i = 0; i &lt;mfrc522.uid.size; i ++) {
    Serial.print (mfrc522.uid.uidByte [i] &lt;0x10? "0": "");
    Serial.print (mfrc522.uid.uidByte [i], HEX);
  }
  Serial.println ();

}

void ShowReaderDetails () {
  // Get the MFRC522 software version
  byte v = mfrc522.PCD_ReadRegister (mfrc522.VersionReg);
  Serial.print (F ("MFRC522 Software Version: 0x"));
  Serial.print (v, HEX);
  if (v == 0x91)
    Serial.print (F ("= v1.0"));
  else if (v == 0x92)
    Serial.print (F ("= v2.0"));
  else
    Serial.print (F ("(unknown)"));
  Serial.println ("");
  // When 0x00 or 0xFF is returned, communication probably failed
  if ((v == 0x00) || (v == 0xFF)) {
    Serial.println (F ("WARNING: Communication failure, is the MFRC522 properly connected?"));
  }
}
</code></pre>
<p dir="auto">Serial output stops with “PCD_Init () Start”. When PCD_Init () is confirmed, it seems to be infinite loop in the following while ().</p>
<pre><code class="language-c">void MFRC522 :: PCD_Reset () {
PCD_WriteRegister (CommandReg, PCD_SoftReset); // Issue the SoftReset command.
// The datasheet does not mention how long the SoftRest command takes to complete.
// But the MFRC522 might have been in soft power-down mode (triggered by bit 4 of CommandReg)
// Section 8.8.2 in the datasheet says the oscillator start-up time is the start up time of the crystal + 37,74�s.Let us be generous: 50ms.
delay (50);
// Wait for the PowerDown bit in CommandReg to be cleared
while (PCD_ReadRegister (CommandReg) &amp; (1 &lt;&lt; 4)) {
// PCD still restarting-unlikely after waiting 50ms, but better safe than sorry.
}
} // End PCD_Reset ()
</code></pre>
<p dir="auto">I also found that the following logs continue to appear.</p>
<pre><code>15:01:09.879 -&gt; [I][esp32-hal-i2c.c:1130] i2cProcQueue(): Bus busy, reinit
15:01:09.924 -&gt; [I][esp32-hal-i2c.c:1130] i2cProcQueue(): Bus busy, reinit
15:01:09.968 -&gt; [I][esp32-hal-i2c.c:1130] i2cProcQueue(): Bus busy, reinit
...
</code></pre>
]]></description><link>https://community.m5stack.com/post/5727</link><guid isPermaLink="true">https://community.m5stack.com/post/5727</guid><dc:creator><![CDATA[iwasada]]></dc:creator><pubDate>Wed, 25 Sep 2019 06:07:24 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use the RFID Unit with the Grove interface on M5Camera? on Tue, 24 Sep 2019 15:03:10 GMT]]></title><description><![CDATA[<p dir="auto">In the M5Stack example code there is a sample rfid program. It seems like you are missing a few things.</p>
<pre><code>#include &lt;Wire.h&gt;
#include "MFRC522_I2C.h"
#include &lt;M5Stack.h&gt;

// 0x28 is i2c address on SDA. Check your address with i2cscanner if not match.
MFRC522 mfrc522(0x28);   // Create MFRC522 instance.

void setup() {
  M5.begin();
  M5.Power.begin();
  M5.Lcd.fillScreen( BLACK );
  M5.Lcd.setCursor(0, 0);
  M5.Lcd.setTextColor(YELLOW);  
  M5.Lcd.setTextSize(2);

  M5.Lcd.fillScreen( BLACK );
  M5.Lcd.setCursor(0, 0);
  M5.Lcd.println("M5StackFire MFRC522");
  Serial.begin(115200);           // Initialize serial communications with the PC
  Wire.begin();                   // Initialize I2C
  
  mfrc522.PCD_Init();             // Init MFRC522
  ShowReaderDetails();            // Show details of PCD - MFRC522 Card Reader details
  Serial.println(F("Scan PICC to see UID, type, and data blocks..."));
  M5.Lcd.println("Scan PICC to see UID, type, and data blocks...");
}

void loop() {
  // Look for new cards, and select one if present
  if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
    delay(50);
    return;
  }
  
  // Now a card is selected. The UID and SAK is in mfrc522.uid.
  
  // Dump UID
  Serial.print(F("Card UID:"));
  M5.Lcd.println(" ");
  for (byte i = 0; i &lt; mfrc522.uid.size; i++) {
    Serial.print(mfrc522.uid.uidByte[i] &lt; 0x10 ? " 0" : " ");
    Serial.print(mfrc522.uid.uidByte[i], HEX);
    M5.Lcd.print(mfrc522.uid.uidByte[i] &lt; 0x10 ? " 0" : " ");
    M5.Lcd.print(mfrc522.uid.uidByte[i], HEX);
  } 
  Serial.println();
  
}

void ShowReaderDetails() {
  // Get the MFRC522 software version
  byte v = mfrc522.PCD_ReadRegister(mfrc522.VersionReg);
  Serial.print(F("MFRC522 Software Version: 0x"));
  Serial.print(v, HEX);
  if (v == 0x91)
    Serial.print(F(" = v1.0"));
  else if (v == 0x92)
    Serial.print(F(" = v2.0"));
  else
    Serial.print(F(" (unknown)"));
  Serial.println("");
  // When 0x00 or 0xFF is returned, communication probably failed
  if ((v == 0x00) || (v == 0xFF)) {
    Serial.println(F("WARNING: Communication failure, is the MFRC522 properly connected?"));
  }
}
</code></pre>
<p dir="auto">obviously the esp camera does not have an lcd, so you would delete those lines and keep the serial lines.</p>
]]></description><link>https://community.m5stack.com/post/5718</link><guid isPermaLink="true">https://community.m5stack.com/post/5718</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Tue, 24 Sep 2019 15:03:10 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use the RFID Unit with the Grove interface on M5Camera? on Fri, 20 Sep 2019 10:41:56 GMT]]></title><description><![CDATA[<p dir="auto">Thank you reply <a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a> .</p>
<p dir="auto">Where can I check the camera version?<br />
Software firmware version?</p>
<p dir="auto">My camera is model B in this photo.<br />
<img src="https://docs.m5stack.com/assets/img/product_pics/unit/unit_m5camera_04.png" alt="photo" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/5667</link><guid isPermaLink="true">https://community.m5stack.com/post/5667</guid><dc:creator><![CDATA[iwasada]]></dc:creator><pubDate>Fri, 20 Sep 2019 10:41:56 GMT</pubDate></item><item><title><![CDATA[Reply to Can I use the RFID Unit with the Grove interface on M5Camera? on Fri, 20 Sep 2019 07:50:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/iwasada" aria-label="Profile: iwasada">@<bdi>iwasada</bdi></a> which version of the camera are you using?</p>
]]></description><link>https://community.m5stack.com/post/5663</link><guid isPermaLink="true">https://community.m5stack.com/post/5663</guid><dc:creator><![CDATA[lukasmaximus]]></dc:creator><pubDate>Fri, 20 Sep 2019 07:50:51 GMT</pubDate></item></channel></rss>