concerting arduino code into python for nfc