-
Notifications
You must be signed in to change notification settings - Fork 420
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
Python 3 and SPI lib updates #80
Conversation
Thank you so much! |
Hi Lucas, I tried to run your fork with SPI and Python3 modifications but I still get this error:
Last version of SPI is installed and pins are connected correctly as documentation explains. Do you have any idea of that issue? Thanks in advace Lucas. Regards. |
Hi @rami85, The old way (your code on line 141): spi.transfer(((addr<<1)&0x7E,val)) The new way: spi.transfer(self.dev_dictionary, ((addr<<1)&0x7E,val)) Take a look at Files Changed tab. With slightly changes in lines 131, 141 and 144 your code must run 😄 |
Thank you Lucas, I cloned the master brach instead your fork. However, I found a couple issues: on line 310 on MFRC522.py:
As you see, you lost a 'b'. It should be:
On the other hand, when the Read.py reads tags, the script prints:
So.. it seems there is another bug on Read.py script. Regards. |
Hey @rami85, I found what the bug is. The old python formatting is using: I will change those things and upload a new version. Best regards, Marvin |
.format method fixed
Python3 (bug fixes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for responding to my request. 👍 @lucassarcanjo
Hi All. I an probably missing something here. Are we waiting for @mxgxw to approve the pull request? |
@@ -52,7 +52,7 @@ def end_read(signal,frame): | |||
|
|||
# If a card is found | |||
if status == MIFAREReader.MI_OK: | |||
print "Card detected" | |||
print("Card detected") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wat speel hier vandaag: UID alle vier de id controleren
I'd include some modifications to run the project on python 3 environment (minor changes). I also modified some functions of read/write SPI, that were changed by LThiery (author of spi library of this sensor library).