You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Library to write an RFID Code in the [EEPROM](https://docs.arduino.cc/learn/built-in-libraries/eeprom) in order to check if the Code corresponds to a Code already saved.
16
16
17
-
## Feature
18
-
19
-
- Compatibility with I2C EEPROM.
20
-
21
17
## Usage
22
18
23
-
This library is used for saving an RFID Code to your Arduino's **internal EEPROM** rather than your Code to avoid **showing your RFID Code**. To then check if the Code corresponds to a Code already registered.
19
+
This library is used for saving an RFID Code to your Arduino's EEPROM or I2C EEPROM rather than your Code to avoid **showing your RFID Code**. To then check if the Code corresponds to a Code already registered.
20
+
21
+
**Warning:** you must use the same number of bytes in your functions as defined in the Constructor and less than or equal to 16!
24
22
25
23
## How To Use
26
24
@@ -31,12 +29,61 @@ Go to the Libraries Manager on [PlatformIO](https://platformio.org/platformio-id
31
29
Or use `platformIO Core CLI` and paste the following command:
Use one of the enumerations below to set EEPROM Size:
59
+
```
60
+
{
61
+
RFIDtoEEPROM_I2C::kbits_2,
62
+
RFIDtoEEPROM_I2C::kbits_4,
63
+
RFIDtoEEPROM_I2C::kbits_8,
64
+
RFIDtoEEPROM_I2C::kbits_16,
65
+
RFIDtoEEPROM_I2C::kbits_32,
66
+
RFIDtoEEPROM_I2C::kbits_64,
67
+
RFIDtoEEPROM_I2C::kbits_128,
68
+
RFIDtoEEPROM_I2C::kbits_256,
69
+
RFIDtoEEPROM_I2C::kbits_512,
70
+
RFIDtoEEPROM_I2C::kbits_1024,
71
+
RFIDtoEEPROM_I2C::kbits_2048
72
+
}
73
+
```
74
+
75
+
And use one of the enumerations below to set twiClock (Wire) Frequence:
76
+
```
77
+
{
78
+
RFIDtoEEPROM_I2C::twiClock100kHz,
79
+
RFIDtoEEPROM_I2C::twiClock400kHz
80
+
}
81
+
```
82
+
83
+
### Functions
84
+
39
85
This library contains several functions:
86
+
40
87
| Name | Description |
41
88
|---|---|
42
89
| `CardNumber()` | Returns the number of Cards already registered. |
@@ -46,7 +93,21 @@ This library contains several functions:
46
93
| `EraseAllCards()` | Resets all Cards to 0. |
47
94
| `MaxCards()` | Returns the maximum number of recordable Cards. Currently **set to 255**. |
48
95
49
-
**Note:** The EEPROM memory has a specified life of 100,000 write/erase cycles, so you may need to be careful about how often you write to it.
96
+
**Note:** The EEPROM memory has a specified life of 100,000 write/erase cycles (depends on models), so you may need to be careful about how often you write to it.
97
+
98
+
## Tested On
99
+
100
+
- Atmel AT24C256
101
+
102
+
## Future Features
103
+
104
+
- Increase the number of recordable Cards (currently set to 255).
105
+
- Improve error handling.
106
+
107
+
## Limitations
108
+
109
+
- The Number of Bytes in the UID must be less than or equal to 16!
0 commit comments