Skip to content

Commit

Permalink
Merge branch 'miguelbalboa:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
devrim-oguz authored Jun 3, 2024
2 parents 7c2f37d + 0ff12a1 commit 8bbc51b
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 52 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
timezone: "Europe/Berlin"
time: "05:00"
labels:
- "github-actions-dependencies"
groups:
github-actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/autoreview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
misspellcheck:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run misspell with reviewdog
uses: reviewdog/action-misspell@v1
#with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.platformio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ jobs:
# example: AccessControl

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
Expand Down
35 changes: 18 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,28 +153,29 @@ The following table shows the typical pin layout used:
| SPI SCK | SCK | 13 / ICSP-3 | 52 | D13 | ICSP-3 | 15 | ICSP3 | SPI-3 |
+-----------+----------+-------------+---------+---------+-----------------+-----------+---------+---------+

+-----------+---------------+--------------------------+
| | ESP8266 | Teensy |
| +---------------+--------+--------+--------+
| | Wemos D1 mini | 2.0 | ++ 2.0 | 3.1 |
+-----------+---------------+--------+--------+--------+
| Signal | Pin | Pin | Pin | Pin |
+===========+===============+========+========+========+
| RST/Reset | D3 | 7 | 4 | 9 |
+-----------+---------------+--------+--------+--------+
| SPI SS | D8 | 0 | 20 | 10 |
+-----------+---------------+--------+--------+--------+
| SPI MOSI | D7 | 2 | 22 | 11 |
+-----------+---------------+--------+--------+--------+
| SPI MISO | D6 | 3 | 23 | 12 |
+-----------+---------------+--------+--------+--------+
| SPI SCK | D5 | 1 | 21 | 13 |
+-----------+---------------+--------+--------+--------+
+-----------+---------------+--------------------------+-------------+
| | ESP8266 | Teensy | 8F328P-U |
| +---------------+--------+--------+--------+-------------+
| | Wemos D1 mini | 2.0 | ++ 2.0 | 3.1 | ALPHA |
+-----------+---------------+--------+--------+--------+-------------+
| Signal | Pin | Pin | Pin | Pin | Pin [5]_ |
+===========+===============+========+========+========+=============+
| RST/Reset | D3 | 7 | 4 | 9 | D9# [1]_ |
+-----------+---------------+--------+--------+--------+-------------+
| SPI SS | D8 | 0 | 20 | 10 | D10# [2]_ |
+-----------+---------------+--------+--------+--------+-------------+
| SPI MOSI | D7 | 2 | 22 | 11 | MOSI / D11# |
+-----------+---------------+--------+--------+--------+-------------+
| SPI MISO | D6 | 3 | 23 | 12 | MISO / D12# |
+-----------+---------------+--------+--------+--------+-------------+
| SPI SCK | D5 | 1 | 21 | 13 | SCK |
+-----------+---------------+--------+--------+--------+-------------+

.. [1] Configurable, typically defined as RST_PIN in sketch/program.
.. [2] Configurable, typically defined as SS_PIN in sketch/program.
.. [3] The SDA pin might be labeled SS on some/older MFRC522 boards.
.. [4] Source: `#111 <https://github.com/miguelbalboa/rfid/issues/111#issuecomment-420433658>`_ .
.. [5] Pin names from the back (empty) side of the board were used as more definitive.
Important: If your micro controller supports multiple SPI interfaces, the library only uses the **default (first) SPI** of the Arduino framework.

Expand Down
5 changes: 4 additions & 1 deletion changes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- Add changes to unreleased tag until we make a release.

xxxxx , v1.4.11
xxxxx , v1.4.12

30 Dec 2023, v1.4.11
- fix: documentation

1 Nov 2021 , v1.4.10
- fix: timeout on Non-AVR boards; feat: Use yield() in busy wait loops @greezybacon
Expand Down
4 changes: 2 additions & 2 deletions doc/PICCMemoryLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ The **MIFARE Classic** chips and protocol is described in the datasheets:
* Mini: http://www.idcardmarket.com/download/mifare_S20_datasheet.pdf

The **MIFARE Ultralight** chip and protocol is described in the datasheets:
* Ultralight: https://www.nxp.com/documents/data_sheet/MF0ICU1.pdf
* Ultralight C: https://www.nxp.com/documents/short_data_sheet/MF0ICU2_SDS.pdf
* Ultralight: https://www.nxp.com/docs/en/data-sheet/MF0ICU1.pdf
* Ultralight C: https://www.nxp.com/docs/en/data-sheet/MF0ICU2_SDS_32.pdf

## MIFARE Classic 1K (MF1S503x)

Expand Down
7 changes: 0 additions & 7 deletions examples/ChangeUID/ChangeUID.ino
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,12 @@ MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance
/* Set your new UID here! */
#define NEW_UID {0xDE, 0xAD, 0xBE, 0xEF}

MFRC522::MIFARE_Key key;

void setup() {
Serial.begin(9600); // Initialize serial communications with the PC
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522 card
Serial.println(F("Warning: this example overwrites the UID of your UID changeable card, use with care!"));

// Prepare key - all keys are set to FFFFFFFFFFFFh at chip delivery from the factory.
for (byte i = 0; i < 6; i++) {
key.keyByte[i] = 0xFF;
}
}

// Setting the UID can be as simple as this:
Expand Down
7 changes: 0 additions & 7 deletions examples/FixBrickedUID/FixBrickedUID.ino
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,12 @@

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

MFRC522::MIFARE_Key key;

void setup() {
Serial.begin(9600); // Initialize serial communications with the PC
while (!Serial); // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522 card
Serial.println(F("Warning: this example clears your mifare UID, use with care!"));

// Prepare key - all keys are set to FFFFFFFFFFFFh at chip delivery from the factory.
for (byte i = 0; i < 6; i++) {
key.keyByte[i] = 0xFF;
}
}

void loop() {
Expand Down
2 changes: 0 additions & 2 deletions examples/MinimalInterrupt/MinimalInterrupt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@

MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance.

MFRC522::MIFARE_Key key;

volatile bool bNewInt = false;
byte regVal = 0x7F;
void activateRec(MFRC522 mfrc522);
Expand Down
10 changes: 1 addition & 9 deletions examples/ReadNUID/ReadNUID.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@

MFRC522 rfid(SS_PIN, RST_PIN); // Instance of the class

MFRC522::MIFARE_Key key;

// Init array that will store new NUID
byte nuidPICC[4];

Expand All @@ -48,13 +46,7 @@ void setup() {
SPI.begin(); // Init SPI bus
rfid.PCD_Init(); // Init MFRC522

for (byte i = 0; i < 6; i++) {
key.keyByte[i] = 0xFF;
}

Serial.println(F("This code scan the MIFARE Classsic NUID."));
Serial.print(F("Using the following key:"));
printHex(key.keyByte, MFRC522::MF_KEY_SIZE);
}

void loop() {
Expand Down Expand Up @@ -123,7 +115,7 @@ void printHex(byte *buffer, byte bufferSize) {
*/
void printDec(byte *buffer, byte bufferSize) {
for (byte i = 0; i < bufferSize; i++) {
Serial.print(buffer[i] < 0x10 ? " 0" : " ");
Serial.print(' ');
Serial.print(buffer[i], DEC);
}
}
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MFRC522",
"version": "1.4.10",
"version": "1.4.11",
"license": "Unlicense",
"keywords": "rfid, spi",
"description": "Arduino RFID Library for MFRC522 (SPI). Read/Write a RFID Card or Tag using the ISO/IEC 14443A/MIFARE interface.",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MFRC522
version=1.4.10
version=1.4.11
author=GithubCommunity
maintainer=GithubCommunity
sentence=Arduino RFID Library for MFRC522 (SPI)
Expand Down

0 comments on commit 8bbc51b

Please sign in to comment.