nrf24l01 with Pico
nrf24l01 with Pico
I'm trying to run this code on my Pico : https://github.com/micropython/micropyt ... l01test.py, but I got this error: ValueError: Unsupported platform rp2. How can I fix it?
Re: nrf24l01 with Pico
It's not surprising that rp2 isn't supported, since this code was last touched before the Raspberry Pi Pico was launched.
Possible (untested) solution: add the following lines before the else: on line 23:
then connect RX to GP4, TX to GP7, SCK to GP6, CSn to GP5 and CE to GP8.
Possible (untested) solution: add the following lines before the else: on line 23:
Code: Select all
elif usys.platform == "rp2": # Hardware SPI
cfg = {"spi": 0, "miso": 4, "mosi": 7, "sck": 6, "csn": 5, "ce": 8}