Skip to content

Instantly share code, notes, and snippets.

@gion-pop
Created April 16, 2017 10:25
Show Gist options
  • Save gion-pop/8b74b3829986e475605ce543e7daeb30 to your computer and use it in GitHub Desktop.
Save gion-pop/8b74b3829986e475605ce543e7daeb30 to your computer and use it in GitHub Desktop.
FeliCa の id 読む
import time
import nfc
def check(id_):
print(id_)
time.sleep(2)
def main():
rdwr = {
'targets': ['212F'],
'on-connect': (lambda _: False),
}
with nfc.ContactlessFrontend('usb') as clf:
while True:
print('*** waiting ***')
tag = clf.connect(rdwr=rdwr)
check(tag.identifier.encode('hex'))
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment