<?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[UHF RFID unit problems interfacing with arduino mega using code example from github]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I have purchased your reader and i am trying to port the library from this url:</p>
<p dir="auto"><a href="https://github.com/m5stack/M5Unit-UHF-RFID" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Unit-UHF-RFID</a></p>
<p dir="auto">To work on an arduino mega. So far i'm not having much luck. I can't even get the UHF RFID unit to print its version using getVersion in setup void much less read my tags..</p>
<p dir="auto">I have made the following changes to the .begin void in order to accomodate it being a mega:</p>
<pre><code>/*! @brief Initialize the Unit UHF_RFID.*/
void Unit_UHF_RFID::begin(HardwareSerial *serial, long baud, bool debug) {
   _debug  = debug;
   _serial = serial;
   _serial-&gt;begin(baud);
}
</code></pre>
<p dir="auto">And then my setup void looks like this:</p>
<pre><code>#include "Unit_UHF_RFID.h"

Unit_UHF_RFID uhf;

String info = "";

void setup() {
 // put your setup code here, to run once:
 Serial.begin(9600);
 Serial.println("Serial begin");

 uhf.begin(&amp;Serial2, 115200, false);

 Serial.println("Serial begin2");

 while (1) {
   info = uhf.getVersion();
   Serial.println("Version: "+info);
   if (info != "ERROR") {
     Serial.println(info);
     break;
   }
 }
 Serial.println("Version: "+info);
 // max: 26dB
 uhf.setTxPower(2600);


}
</code></pre>
<p dir="auto">Hope someone can help me understand why this isn't working..</p>
]]></description><link>https://community.m5stack.com/topic/5237/uhf-rfid-unit-problems-interfacing-with-arduino-mega-using-code-example-from-github</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Mar 2026 05:04:44 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5237.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 21 Apr 2023 07:12:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UHF RFID unit problems interfacing with arduino mega using code example from github on Tue, 30 May 2023 05:36:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/39809">@kasperhvid</a>, any luck on that?<br />
I was hoping to do the same but all I get is an obscure "ERROR" response back from the getVersion() method.</p>
]]></description><link>https://community.m5stack.com/post/21034</link><guid isPermaLink="true">https://community.m5stack.com/post/21034</guid><dc:creator><![CDATA[pierrethr]]></dc:creator><pubDate>Tue, 30 May 2023 05:36:17 GMT</pubDate></item></channel></rss>