Skip to content

Instantly share code, notes, and snippets.

@jenovateurs
Created November 12, 2019 15:43
Show Gist options
  • Save jenovateurs/057a03896531b12c3586701ef89fea6a to your computer and use it in GitHub Desktop.
Save jenovateurs/057a03896531b12c3586701ef89fea6a to your computer and use it in GitHub Desktop.
Lire des données sur un badge/carte RFID avec un Raspberry Pi
#!/usr/bin/env python
import RPi.GPIO as GPIO
import SimpleMFRC522
reader = SimpleMFRC522.SimpleMFRC522()
try:
id, text = reader.read()
print(id)
print(text)
finally:
GPIO.cleanup()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment