nRF24 / CircuitPython_nRF24L01

CircuitPython driver library for the nRF24L01 transceiver.
http://circuitpython-nrf24l01.rtfd.io/
MIT License
45 stars 11 forks source link

Add try except #46

Closed DjamikTea closed 1 year ago

DjamikTea commented 1 year ago

sometimes broken packages arrive

2bndy5 commented 1 year ago

Instead of compensating in the code, you should check your wiring or try lowering the SPI speed (spi_frequency kwarg for the constructor). This is often not a problem with the data that gets transmitted because CRC prevents data corruption, rather this is often a problem with the SPI connections.

nrf = RF24(SPI_BUS, CSN_PIN, CE_PIN, spi_frequency=4000000)
2bndy5 commented 1 year ago

I am curious what device, specifically the MCU board, is experiencing the "broken packages"? And, are you using very long wires?

DjamikTea commented 1 year ago

I found the problem. Arduino sent some packets at startup. I changed library, lmao

2bndy5 commented 1 year ago

In the future, please open an Issue first before submitting a Pull Request - this could've saved you needless work.