File tree Expand file tree Collapse file tree 4 files changed +46
-4
lines changed Expand file tree Collapse file tree 4 files changed +46
-4
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * A simple example to interface with rdm6300 rfid reader using
3+ * hardware uart "Serial" instead of the default software uart driver.
4+ *
5+ * Will only compile for boards with Serial1 or more:
6+ * https://www.arduino.cc/reference/en/language/functions/communication/serial/
7+ *
8+ * Arad Eizen (https://github.com/arduino12).
9+ */
10+
11+ #include < rdm6300.h>
12+
13+ #define READ_LED_PIN 13
14+
15+ Rdm6300 rdm6300;
16+
17+ void setup ()
18+ {
19+ Serial.begin (115200 );
20+
21+ pinMode (READ_LED_PIN, OUTPUT);
22+ digitalWrite (READ_LED_PIN, LOW);
23+
24+ Serial1.begin (RDM6300_BAUDRATE); // read the doc above, find the RX pin number in the link
25+ rdm6300.begin (&Serial1);
26+
27+ Serial.println (" \n Place RFID tag near the rdm6300..." );
28+ }
29+
30+ void loop ()
31+ {
32+ /* if non-zero tag_id, update() returns true- a new tag is near! */
33+ if (rdm6300.update ())
34+ Serial.println (rdm6300.get_tag_id (), HEX);
35+
36+ digitalWrite (READ_LED_PIN, rdm6300.is_tag_near ());
37+
38+ delay (10 );
39+ }
Original file line number Diff line number Diff line change 33 *
44 * Connect the rdm6300 to VCC=5V, GND=GND, TX=any GPIO (this case GPIO-04)
55 * Note that the rdm6300's TX line is 3.3V level,
6- * so it's save to use with both AVR* and ESP* microcontrollers.
6+ * so it's safe to use with both AVR* and ESP* microcontrollers.
7+ *
8+ * This example uses SoftwareSerial, please read its limitations here:
9+ * https://www.arduino.cc/en/Reference/softwareSerial
710 *
811 * Arad Eizen (https://github.com/arduino12).
912 */
1013
1114#include < rdm6300.h>
1215
13- #define RDM6300_RX_PIN 4
16+ #define RDM6300_RX_PIN 4 // read the SoftwareSerial doc above! may need to change this pin to 10...
1417#define READ_LED_PIN 13
1518
1619Rdm6300 rdm6300;
Original file line number Diff line number Diff line change 11{
22 "name" : " rdm6300" ,
3- "version" : " 1.1.6 " ,
3+ "version" : " 1.1.7 " ,
44 "keywords" : " rdm6300, rfid" ,
55 "description" : " A simple library to interface with rdm6300 rfid reader." ,
66 "repository" :
Original file line number Diff line number Diff line change 11name =Rdm6300
2- version =1.1.6
2+ version =1.1.7
33author =Arad Eizen
44maintainer =Arad Eizen <https://github.com/arduino12>
55sentence =A simple library to interface with rdm6300 rfid reader.
You can’t perform that action at this time.
0 commit comments