0

I can use the nrf24l01 wireless module just fine with a Raspberry Pi Pico, but when I try to compile the same code on the Raspberry Pi Pico W, it fails to recognize the device. I am using this library, and I get this error:

Traceback (most recent call last):
File "<stdin>", line 31, in <module>
File "nrf24l01.py", line 78, in __init__
OSError: nRF24L01+ Hardware not responding

The boards are supposed to have the same footprint, so what is the difference here? How can I use these modules with the Pico W?

1 Answer 1

0

In my experience, this is the result of faulty wiring or a bad NRF24L01 module. One thing that you should also check is that your SPI interface is set up correctly. For example, SPI(0) defaults to using GPs 2, 3 and 4 (pins 4, 5 and 6, respectively).

>>> SPI(0)
SPI(0, baudrate=3906250, polarity=0, phase=0, bits=8, sck=2, mosi=3, miso=4)

Thus, you should use pin 4 for SCK, even though technically pins 9 and 22 can also be used for SCK. If you really want to use these other pins, you'll have to specify the pins manually using the SPI constructor.

Sign up to request clarification or add additional context in comments.

1 Comment

This is actually what ended up solving it, though there was no faulty wiring or bad sensors. I will post my solution here soon. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.