Skip to content

Commit 268682d

Browse files
ijashRotzbua
authored andcommitted
Update comments in examples (#457)
It's seems not that important, but this helps the new user understand the code.
1 parent d6979db commit 268682d

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

examples/ChangeUID/ChangeUID.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void setup() {
6161
// But of course this is a more proper approach
6262
void loop() {
6363

64-
// Look for new cards, and select one if present
64+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle. And if present, select one.
6565
if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
6666
delay(50);
6767
return;

examples/DumpInfo/DumpInfo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void setup() {
5151
}
5252

5353
void loop() {
54-
// Look for new cards
54+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
5555
if ( ! mfrc522.PICC_IsNewCardPresent()) {
5656
return;
5757
}

examples/MifareClassicValueBlock/MifareClassicValueBlock.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void setup() {
6565
* Main loop.
6666
*/
6767
void loop() {
68-
// Look for new cards
68+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
6969
if ( ! mfrc522.PICC_IsNewCardPresent())
7070
return;
7171

examples/Ntag216_AUTH/Ntag216_AUTH.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void setup() {
2626
}
2727

2828
void loop() {
29-
// Look for new cards
29+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
3030
if ( ! mfrc522.PICC_IsNewCardPresent()) {
3131
return;
3232
}
@@ -55,4 +55,4 @@ void loop() {
5555
mfrc522.PICC_DumpMifareUltralightToSerial(); //This is a modifier dunp just cghange the for cicle to < 232 instead of < 16 in order to see all the pages on NTAG216
5656

5757
delay(3000);
58-
}
58+
}

examples/ReadAndWrite/ReadAndWrite.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void setup() {
6464
* Main loop.
6565
*/
6666
void loop() {
67-
// Look for new cards
67+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
6868
if ( ! mfrc522.PICC_IsNewCardPresent())
6969
return;
7070

examples/ReadNUID/ReadNUID.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void setup() {
5757

5858
void loop() {
5959

60-
// Look for new cards
60+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
6161
if ( ! rfid.PICC_IsNewCardPresent())
6262
return;
6363

examples/rfid_default_keys/rfid_default_keys.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ bool try_key(MFRC522::MIFARE_Key *key)
119119
* Main loop.
120120
*/
121121
void loop() {
122-
// Look for new cards
122+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
123123
if ( ! mfrc522.PICC_IsNewCardPresent())
124124
return;
125125

examples/rfid_read_personal_data/rfid_read_personal_data.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void loop() {
4949

5050
//-------------------------------------------
5151

52-
// Look for new cards
52+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
5353
if ( ! mfrc522.PICC_IsNewCardPresent()) {
5454
return;
5555
}

examples/rfid_write_personal_data/rfid_write_personal_data.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void loop() {
4040
MFRC522::MIFARE_Key key;
4141
for (byte i = 0; i < 6; i++) key.keyByte[i] = 0xFF;
4242

43-
// Look for new cards
43+
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
4444
if ( ! mfrc522.PICC_IsNewCardPresent()) {
4545
return;
4646
}
@@ -153,4 +153,4 @@ void loop() {
153153
mfrc522.PICC_HaltA(); // Halt PICC
154154
mfrc522.PCD_StopCrypto1(); // Stop encryption on PCD
155155

156-
}
156+
}

0 commit comments

Comments
 (0)