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.
Dependencies: NOKIA_5110 mbed
Fork of Lost-Found_BOX2 by
Diff: myRFID.h
- Revision:
- 7:725f5fb7e3a3
- Child:
- 8:e683edc8a530
diff -r 6635082215c7 -r 725f5fb7e3a3 myRFID.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/myRFID.h Mon Dec 07 14:43:15 2015 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "MFRC522.h"
+#define MF_RESET D9
+
+
+extern MFRC522 RfChip;
+extern char buffers[5];
+extern char IDs[17];
+
+void GetID(uint8_t ID[])
+{
+ for (uint8_t i = 0; i < RfChip.uid.size; i++)
+ {
+ ID[i] = RfChip.uid.uidByte[i];
+ sprintf(buffers,"%X",RfChip.uid.uidByte[i]);
+ strcat(IDs,buffers);
+ };
+}
+uint8_t check(uint8_t ID[])
+{
+ uint8_t x=0;
+ for(uint8_t i = 0; i < RfChip.uid.size; i++)
+ {
+ if(ID[i] == RfChip.uid.uidByte[i]){ x = x+1;}
+ }
+ if(x == RfChip.uid.size){return 1;}
+ else {return 0;}
+}
\ No newline at end of file
