Functional description: Check User Permission on daily basis with Particle (Photon) on RFID Module MFRC522 against Files on SD-Card, saved in JSON Format.
npm install -g particle-cli particle login
git clone https://github.com/ljonka/NFCAccess.git
particle compile photon .
particle flash .
Particle Photon | MFRC522 | MicroSD Card Adapter | Taster | Relais Module | Resistor |
A0 | |||||
A1 | 8 (SDA) | ||||
A2 | 6 (CS) | ||||
A3 | 7 (SCK) | ||||
A4 | 5 (MISO) | ||||
A5 | 6 (MOSI) | ||||
D0 | 3 (IN) | ||||
D1 | 2 | 2 | |||
D2 | 2 (RST) | ||||
D3 | 5 (SCK) | ||||
D4 | 3 (MISO) | ||||
D5 | 4 (MOSI) | ||||
3,3V | 1 (3,3V) | 1 | |||
GND | 3 (GND) | 1 (GND) | 1 | 2 (GND) | |
VIN(5V) | 2 (VCC) | 1 (VCC) | |||
- Particle Photon STM32F2
- RFID-RF522 MFRC522
- MicroSD Card Adapter Catalex
- Taster
- Relais Module SRD-05VDC-SL-C
- 1,5MOhm Resistor
Example - allow uid "_123_123_123_123" access each day, Filename: "_123_123_123_123" in SDCard's Root Directory
{"u":"_123_123_123_123", "t":[1,1,1,1,1,1,1]}
The "t" Param stands for "Access Time", 1 = allow, 0 = permit. One Value for each weekday, starting on Sunday.
Send the json over cloud with the following command:particle call your-device-id updateKey '{"u":"_123_123_123_123", "t":[1,1,1,1,1,1,1]}'
This should create a file naming "_123_123_123_123" on SDCard and set the rights as requested.