nfc-module #10
Reference in New Issue
Block a user
Delete Branch "nfc-module"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Simple nfc module with async polling task.
Please also fix the failing flake8 check.
@@ -0,0 +28,4 @@asyncio.run(main())'''def __init__(self):self.reader = MFRC522(spi_id=1, sck=10, miso=12, mosi=11, cs=13, rst=9, tocard_retries=10)I don't like the hardcoded pin numbers. Actually, I think I would prefer it if the reader was passed in:
That way we could also pass in some FakeReader for testing.
@@ -0,0 +40,4 @@'''return '0x' + ''.join(f'{i:02x}' for i in uid)async def _reader_poll_task(self, poll_interval_ms: int = 50) -> list:Is the return type really
list?d40ecd897eto7e57b00c1e89e58a92c3to976bc4053c