-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
MFRC522-python/mfrc522/MFRC522.py
Lines 216 to 220 in 970e903
| while True: | |
| n = self.Read_MFRC522(self.CommIrqReg) | |
| i -= 1 | |
| if ~((i != 0) and ~(n & 0x01) and ~(n & waitIRq)): | |
| break |
so CPU usage is really high, about 105% on idle state, the raspberry shutdown after a while and we have to restart the code again.
I tracked the problem the line 216 in MFRC522, I've added a simple sleep of 10 milliseconds and it seemed to lower the CPU usage a bit (about 45%); it still cause an issue and the reader stops randomly.
for the record, I didn't hook up the IRQ pin (i was following a tutorial that referred this code and they didn't hook it up), could this be the case? I could test since I've run out of pins in my IoT device.
Metadata
Metadata
Assignees
Labels
No labels