I am using JRD-100 - Arduino UHF-RFID Module
I have a hex code to start getting the hardware to work searching for the ID
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11);// RX, TX
unsigned char incomingByte;
void setup() {
Serial.begin(115200);
mySerial.begin(115200);
delay(200);
// 开机发多次轮询指令
byte message[] = {0xBB,0x00,0x27,0x00,0x03,0x22,0x27,0x10,0x83,0x7E};
mySerial.write(message, sizeof(message));
}
String value;
void loop() {
// put your main code here, to run repeatedly:
while (mySerial.available() > 0) {
incomingByte = mySerial.read();
value += String(incomingByte,HEX);
value += " ";
}
if(value.length() > 1){
Serial.print(value);
Serial.println();
value = "";
}
delay(60);
}
he will show hex out
He wants to convert dec to calculate rrsi
The next field is to display the card number.
I want to make a circuit breaker sound if a certain card walks a certain distance. I would like to ask how to write the code to check the card number. thanks
Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'
Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination
See also FAQ - Arduino Forum for general rules on forum behaviour and etiquette.
Hello,
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is fru…
0xBB <- start byte
0x022200 ?
0x11 <- data length (17)
0xXXXX <- RRSI? (little-endian)
0x00 ?
14 bytes of data (ID?)
0xXXXX <- Checksum
system
Closed
December 1, 2022, 1:41pm
4
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.