Library for the Robotics RedBee™RFID Reader.

Files at this revision

API Documentation at this revision

Comitter:
Sebastien Prouff
Date:
Wed Nov 10 16:48:19 2021 +0100
Parent:
0:9765e979a653
Commit message:
Feature : add documentation

Changed in this revision

readme.md Show annotated file Show diff for this revision Revisions of this file
diff -r 9765e979a653 -r 63229f10d6e0 readme.md
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.md	Wed Nov 10 16:48:19 2021 +0100
@@ -0,0 +1,65 @@
+# Librairie Robotics_RFID_Reader
+
+## Import library
+
+```shell
+mbed add http://os.mbed.com/users/sepro/code/Grove-RFID-Reader/
+```
+
+
+
+
+
+# Class documentation
+
+### public members
+
+**Constructor RoboticsRfid** 
+
+```c++
+RoboticsRfidReader(PinName Tx, PinName Rx);
+```
+
+**Non blockin line reading on serial. '\n' for End Of Line.**
+
+```c++
+bool rfidRead(unsigned char *tampon)
+```
+
+### Private attributes
+
+```
+UnbufferedSerial **_rfid**
+```
+
+```
+unsigned char **_c**
+```
+
+
+
+### Description
+
+ Example
+
+```c++
+#define ID_BADGE "1 7 221 87 161"
+RoboticsRfidReader myRfid(D1, D0);
+
+int main() {
+	unsigned char buffer[30];
+	bool lineRead;
+	while (true) {
+  		lineRead = myRfid.rfidRead(buffer);
+  		if (lineRead) {
+			printf("buffer : %s", buffer);
+ 			printf("\r\n");
+		if (strstr((char *)tampon, ID_BADGE))) {
+ 			printf("OK \r\n");
+		} else {
+  			printf("NOK \r\n");
+ 		}
+  	}
+}
+```
+