| 2 |
raymond |
1 |
In this example, a simple access control system has been implemented using RFID tags and the [Arduino_MFRC522v2](https://github.com/OSSLibraries/Arduino_MFRC522v2) library.
|
|
|
2 |
|
|
|
3 |
The system allows enabling or disabling any type of user, each of whom can be assigned a different role.
|
|
|
4 |
|
|
|
5 |

|
|
|
6 |
|
|
|
7 |
For instance, modifying or deleting user accounts requires logging in with a role level of at least 5 (such as the admin user).
|
|
|
8 |
Users with lower levels can still log in, but only to view data.
|
|
|
9 |
|
|
|
10 |
# Logs
|
|
|
11 |

|
|
|
12 |
|
|
|
13 |
# User management
|
|
|
14 |

|
|
|
15 |
|
|
|
16 |
# Customization
|
|
|
17 |
By default, this example includes web pages embedded in the firmware as C arrays, compressed using Gzip.
|
|
|
18 |
|
|
|
19 |
To customize the appearance of the web pages,
|
|
|
20 |
upload the [`login`](https://github.com/cotestatnt/async-esp-fs-webserver/blob/master/examples/localRFID/data/login)
|
|
|
21 |
and [`rfid`](https://github.com/cotestatnt/async-esp-fs-webserver/blob/master/examples/localRFID/data/rfid) files (without extensions) to the microcontroller's flash memory using built-in functionality (/setup webpage).
|
|
|
22 |
You can find both files in the `"/data"` folder.
|
|
|
23 |
|
|
|
24 |
Then set `#define USE_EMBEDDED_HTM false` in order to serve files webpage instead embedded.
|
|
|
25 |
|
|
|
26 |
In the [mysqlRFID.ino](https://github.com/cotestatnt/async-esp-fs-webserver/blob/master/examples/mysqlRFID/mysqlRFID.ino) example, a MySQL database is used through the [Arduino-MySQL](https://github.com/cotestatnt/Arduino-MySQL) library.
|
|
|
27 |
Since the database is centralized, it supports multiple RFID tag readers, logging each access point for tracking purposes.
|
|
|
28 |
The web pages in this example are embedded as `const char*` strings, making them easy to edit directly within the project.
|