udapted NFC PN523 code