py532 with i2c - Raspberry Pi Forums
hi
connecting adafruit pn532 nfc reader raspberry pi. want read tag data using python script. using example http://hubcitylabs.org/nfc-on-raspberry ... b-and-i2c/
have enabled i2c on pi , sudo i2cdetect -y 1 giving:
0 1 2 3 4 5 6 7 8 9 b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- uu -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
have installed pn532lib, python3 when executing sudo python reader.py, giving following error:
file "reader.py", line 5, in <module>
py532lib.i2c import *
importerror: no module named i2c
can me this?
regards
nancy
connecting adafruit pn532 nfc reader raspberry pi. want read tag data using python script. using example http://hubcitylabs.org/nfc-on-raspberry ... b-and-i2c/
have enabled i2c on pi , sudo i2cdetect -y 1 giving:
0 1 2 3 4 5 6 7 8 9 b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- uu -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
have installed pn532lib, python3 when executing sudo python reader.py, giving following error:
file "reader.py", line 5, in <module>
py532lib.i2c import *
importerror: no module named i2c
can me this?
regards
nancy
you have set pythonpath environment variable.
example,
1. add pythonpath in ~/.bashrc file 2. add pythonpath in code luck project : )
example,
1. add pythonpath in ~/.bashrc file
code: select all
pythonpath="${pythonpath}:/path/to/pn532lib"
code: select all
import sys sys.path.append("/path/to/py532lib")
raspberrypi
Comments
Post a Comment