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

spi.transfer takes two arguments #2

Closed
deepsweb opened this issue Feb 25, 2019 · 4 comments
Closed

spi.transfer takes two arguments #2

deepsweb opened this issue Feb 25, 2019 · 4 comments

Comments

@deepsweb
Copy link

Can you please tell me what below error means? I'm simply trying to run Read.py

Traceback (most recent call last):
File "RFID.py", line 12, in
mfrc = MFRC522.MFRC522()
File "/home/pi/ MFRC522.py", line 115, in init
self.MFRC522_Init()
File "/home/pi/ MFRC522.py", line 412, in MFRC522_Init
self.MFRC522_Reset();
File "/home/pi/ MFRC522.py", line 118, in MFRC522_Reset
self.Write_MFRC522(self.CommandReg, self.PCD_RESETPHASE)
File "/home/pi/ MFRC522.py", line 121, in Write_MFRC522
spi.transfer(((addr<<1)&0x7E,val))
TypeError: function takes exactly 2 arguments (1 given)

@SuhaylZhao
Copy link
Member

Hi,

Please send me your wiring diagram and screenshots of the execution results. This will help us to identify your problems.

Thanks.

@deepsweb
Copy link
Author

image
img_20190224_204544
img_20190224_204601

@SuhaylZhao
Copy link
Member

Hi,

We found the solution to the problem.

This is because the SPI-Py library has been updated recently, and the function has changed a lot, which is incompatible with the previous version.

Our solution is to provide previous versions of the SPI-Py library. We will then update the code to accommodate the latest version of the SPI-Py library.

You can download the previous version of the SPI-Py library here, https://github.com/Freenove/SPI-Py

In addition, I find that the kit you use is not our product. But we still thank you for your questions. For our products, we provide free technical support. And our products are already welded, no need for customers to re-process. Welcome to our Amazon store,http://freenove.com/store.html .

Thanks again.

@deepsweb
Copy link
Author

Thank you Suhayl!
It works now!

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

No branches or pull requests

2 participants