Update comments in examples (#457)
It's seems not that important, but this helps the new user understand the code.
This commit is contained in:
@@ -61,7 +61,7 @@ void setup() {
|
|||||||
// But of course this is a more proper approach
|
// But of course this is a more proper approach
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
// Look for new cards, and select one if present
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle. And if present, select one.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
|
if ( ! mfrc522.PICC_IsNewCardPresent() || ! mfrc522.PICC_ReadCardSerial() ) {
|
||||||
delay(50);
|
delay(50);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void setup() {
|
|||||||
* Main loop.
|
* Main loop.
|
||||||
*/
|
*/
|
||||||
void loop() {
|
void loop() {
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent())
|
if ( ! mfrc522.PICC_IsNewCardPresent())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ void setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void setup() {
|
|||||||
* Main loop.
|
* Main loop.
|
||||||
*/
|
*/
|
||||||
void loop() {
|
void loop() {
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent())
|
if ( ! mfrc522.PICC_IsNewCardPresent())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ void setup() {
|
|||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
|
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! rfid.PICC_IsNewCardPresent())
|
if ( ! rfid.PICC_IsNewCardPresent())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ bool try_key(MFRC522::MIFARE_Key *key)
|
|||||||
* Main loop.
|
* Main loop.
|
||||||
*/
|
*/
|
||||||
void loop() {
|
void loop() {
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent())
|
if ( ! mfrc522.PICC_IsNewCardPresent())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void loop() {
|
|||||||
|
|
||||||
//-------------------------------------------
|
//-------------------------------------------
|
||||||
|
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void loop() {
|
|||||||
MFRC522::MIFARE_Key key;
|
MFRC522::MIFARE_Key key;
|
||||||
for (byte i = 0; i < 6; i++) key.keyByte[i] = 0xFF;
|
for (byte i = 0; i < 6; i++) key.keyByte[i] = 0xFF;
|
||||||
|
|
||||||
// Look for new cards
|
// Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
|
||||||
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
if ( ! mfrc522.PICC_IsNewCardPresent()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user