Usage Example for Arduino-Module Status Switching
Last revision 2026/01/06
This article demonstrates how to use Arduino to switch between stopping and restarting RFID tag reading, with detailed hardware setup and sample code.
Hardware Preparation
- ID01 UHF RFID Reader-RS485(SKU: TEL0081) ×1
- DFRduino UNO R3 (SKU: DFR0216) × 1
- Multiplexer(SKU: TEL0070) × 1
- USB Cable × 1
- Dupont Wires
Wiring Diagram


The wire definition of UHF RFID MODULE-RS485 is:
- red:Input 7V/2A
- black:GND
- green:A end
- yellow:B end
Sample Code
This sample shows that use Arduino to control the status exchanging between "Stop reading tags" and "Restart tag identification function”.
unsigned char StopReadCode[5] = {0xa0,0x03,0xa8,0x00,0xb5};//Stop reading the label code
unsigned char ResetCode[5]={0xa0,0x03,0x65,0x00,0xf8};//Reset code
unsigned char StopReadCodeCB[6]={0xe0,0x04,0xa8,0x00,0x00,0x74};//Stop reading code success and return the value
unsigned char ResetCodeCB[6]={0xe4,0x04,0x65,0x00,0x00,0xb3};//Reset code success and return the value
unsigned char data[6]={};
void setup()
{
Serial.begin(9600);
}
void loop()
{
int i;
int n=1;
delay(2000);
while(n)
{
Serial.write(StopReadCode,5);
delay(200);
if(Serial.available())
{
for(i=0;i<6;i++)
{
data[i]=Serial.read();
delay(1);
}
for(i=0;i<6;i++)
{
if(data[i]==StopReadCodeCB[i])
n=0;
else
n=1;
}
}
delay(500);
}
n=1;
while(n)
{
Serial.write(ResetCode,5);
delay(200);
if(Serial.available())
{
for(i=0;i<6;i++)
{
data[i]=Serial.read();
delay(1);
}
for(i=0;i<6;i++)
{
if(data[i]==ResetCodeCB[i])
n=0;
else
n=1;
}
}
delay(500);
}
}
Was this article helpful?
