Ich nutze das hier mal ein wenig als Notizzettel für ein späteres readme...
Installation libnfc nach https://learn.adafruit.com/ada…pberry-pi/building-libnfc
(link ändern - ist jetzt auf github)
vor automake noch ein touch NEWS und touch README (sonst stürzt automake)
pip installieren, falls nicht schon vorhanden
dann danach vorgehen:
http://nfcpy.org/latest/topics/get-started.html#installation
Verkabelung standard:
VCC - 5V
GND - GND
RX - TX (GPIO 14)
TX - RX (GPIO 15)
python tagtool.py --device tty:AMA0:pn532 -- funktioniert, tag gefunden
srccode nach /usr/local/lib/python2.7/dist-packages/nfc kopieren (sudo)
erfolgreich in python, gibt die IDs meiner (2) tags aus:
Code
import nfc
def connected(tag):
try:
hmm = str(tag)
bla, ID = hmm.split('ID=')
print(ID)
return False
except KeyboardInterrupt:
raise
clf = nfc.ContactlessFrontend('tty:AMA0:pn532')
while True:
try:
clf.connect(rdwr={'on-connect': connected})
except KeyboardInterrupt:
raise
Alles anzeigen
todo: keyboard basteln....