rc522 перестает читать при странных обстоятельствах
- Войдите на сайт для отправки комментариев
Чт, 12/10/2017 - 16:22
Вот код, всем известный и не хитрый, при правильной работе пишет строку:
...v0x92..
затем я решил потестировать, стал жать reset много раз, а затем вылетает ошибка. Вопрос, в чем прична
#include <deprecated.h> #include <MFRC522.h> #include <MFRC522Extended.h> #include <require_cpp11.h> #include <SPI.h> #include <MFRC522.h> #define RST_PIN 0 // Configurable, see typical pin layout above #define SS_PIN A1 // Configurable, see typical pin layout above MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance 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 pinMode(10, OUTPUT); digitalWrite(10, HIGH); mfrc522.PCD_Init(); // Init MFRC522 mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD - MFRC522 Card Reader details } void loop() { // Look for new cards if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if ( ! mfrc522.PICC_ReadCardSerial()) { return; } // Dump debug info about the card; PICC_HaltA() is automatically called mfrc522.PICC_DumpToSerial(&(mfrc522.uid)); }
Чт, 12/10/2017 - 16:28
#1
Версия прошивки: значение 0xff = (неизвестно)
Версия прошивки: 0х0 = (неизвестно)