Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sleep function to reduce processor load #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

agentflippy5
Copy link

Reduced processor load on my Raspberry Pi Zero W by 99%
Fixes Issue #9

mikalstill added a commit to mikalstill/MFRC522-python that referenced this pull request Jun 12, 2019
Quick fix to reduce CPU load while sitting around waiting for a read.
With apologies to pimylifeup#12
@@ -214,6 +214,7 @@ def MFRC522_ToCard(self, command, sendData):

i = 2000
while True:
time.sleep(0.25)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried adding this to my local version of the code, and RFID reads have stopped working. CPU load is certainly a problem for me (loads of over 100 on a raspberry pi zero w), but this doesn't seem like a working fix to me?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants