Uncategorized

mfrc522

Asked 
Active today
Viewed 3 times

This post has been deleted and is no longer viewable

0

I’m trying to use a mfrc522 mifare reader on a Rpi 3b as per tutorial here and have downloaded the mfrc522 library and installed python3-dev and spidev.

When I try to import the mfrc522 library in a simple python script, the interpreter can’t find the “machine” module used in the mfrc522.py library.


import RPi.GPIO as GPIO
from mfrc522 import SimpleMFRC522

reader = SimpleMFRC522()

try:
        id, text = reader.read()
        print(id)
        print(text)

finally:
        GPIO.cleanup()
Traceback (most recent call last):
  File "read_tag.py", line 4, in <module>
    from mfrc522 import SimpleMFRC522
  File "/home/pi/python/raspberrypi_mfrc522/mfrc522.py", line 1, in <module>
    from machine import Pin, SPI
ModuleNotFoundError: No module named 'machine'

I can’t find what library package this module should exist in.. Can anyone help me try to figure out what libraries I need to (re)install to get this working??

Thanks in advance!

Thanks

share  edit  follow  close   flag
 New contributor
 user1995839 is a new contributor. Be nice, and check out our Code of Conduct.

485 characters left

Add Comment
help
×
Cannot add comments to this post; it may be locked, deleted, or frozen

Your Answer

 

try this:

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: