Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RoboticsRfidReader Class Reference
Example. More...
#include <robotics_rfid_reader.h>
Public Member Functions | |
| RoboticsRfidReader (PinName Tx, PinName Rx) | |
| RoboticsRfid constructor. | |
| bool | rfidRead (unsigned char *tampon) |
| Non blockin readin on serial. | |
Detailed Description
Example.
#define ID_BADGE "1 7 221 87 161" RoboticsRfidReader myRfid(D1, D0); int main() { unsigned char buffer[30]; bool lineRead; printf("RFID TEST \r\n"); 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"); } } } }
- Date:
- 31/01/2021
Definition at line 42 of file robotics_rfid_reader.h.
Constructor & Destructor Documentation
| RoboticsRfidReader | ( | PinName | Tx, |
| PinName | Rx | ||
| ) |
RoboticsRfid constructor.
- Parameters:
-
Tx : Tx pin Rx : Rx Pin
Definition at line 12 of file robotics_rfid_reader.cpp.
Member Function Documentation
| bool rfidRead | ( | unsigned char * | tampon ) |
Non blockin readin on serial.
'
' for End Of Line
- Parameters:
-
tampon : reception buffer
- Returns:
- true if the read is complete, false otherwise tampon will contain the string (in a char* )
Definition at line 21 of file robotics_rfid_reader.cpp.
Generated on Thu Dec 8 2022 13:42:29 by
1.7.2