Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1251

Python • Re: How to handle bytearray from NFC Tag Reader

$
0
0
You could convert the data into a str:

Code:

bytearray(b'\x03\x0c\xd1\x01\x08T\x02enOmega\xfe\x00').decode()
But this raises the exception UnicodeDecodeError, which is normal, because it has illegal unicode sequences inside.

You need to know the data structure, where the data starts and the length of the data.

Statistics: Posted by DeaD_EyE — Thu Dec 19, 2024 8:52 am



Viewing all articles
Browse latest Browse all 1251

Trending Articles