Raspberry Pi Pico: nRF24L01 over SPI #10155
Replies: 6 comments 3 replies
-
I'm not sure about Thonny, but the driver you're looking for is here: https://github.com/micropython/micropython-lib/tree/master/micropython/drivers/radio/nrf24l01 |
Beta Was this translation helpful? Give feedback.
-
Hello Peter, I have been going through this for ... a month .... old links send me to a non-exhistant library Can I buy you a couple coffees ? Thank you soo much Oh and I have a dream of this pcb:has holes to solder in picohas nrf module included ( one that works ). You can make a deal with someone that sells the stuff do you do not have to touch it. has solder holes for nrfcompletes the board out with generic solder holes, you know the ones that have 5 holes in parallel. Thank you very much Peter !!! > -------- Original Message --------> Subject: Re: [micropython/micropython] Raspberry Pi Pico: nRF24L01 over> SPI (Discussion #10155)> From: Peter Hinch ***@***.***>> Date: Tue, December 13, 2022 8:26 am> To: micropython/micropython ***@***.***>> Cc: melvincramer911 ***@***.***>, Mention> ***@***.***>> > > Indeed. My approach would be to use that driver and run `nrf24l01test.py` on both Picos. Run `initiator` on one and `responder` on the other. If you wire the radios as per the test script it will work. Then start adapting the script for your purposes.> > -- > Reply to this email directly or view it on GitHub:> #10155 (reply in thread)> You are receiving this because you were mentioned.> > Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello Peter
I must be missing something
the NRF modules I see there are like 22 dollars and 11 bucks for the
antenna.
I was thinking about buying a dozen of them so like 400$ plus shipping.
looks like I will need to get a second job to support my hobby
Regards
David
… -------- Original Message --------
Subject: Re: [micropython/micropython] Raspberry Pi Pico: nRF24L01 over
SPI (Discussion #10155)
From: Peter Hinch ***@***.***>
Date: Wed, December 14, 2022 7:28 am
To: micropython/micropython ***@***.***>
Cc: melvincramer911 ***@***.***>, Mention
***@***.***>
> Where do you get your chips that work?
A lot of NRF24L01 modules on eBay are rubbish. Sparkfun ones always work well in my experience.
--
Reply to this email directly or view it on GitHub:
#10155 (reply in thread)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Options are to see if your supplier will give a quantity discount. Or buy a few cheap ones from different sources, find one that works, then buy some more. Maybe I was unlucky, but the cheap ones I bought could barely communicate across my very small office/lab. |
Beta Was this translation helpful? Give feedback.
-
Thank you Peter
Google says you are correct, I say you are a great guy and it is a shame
there is not a pico - nrf !!!
Thank you again
… -------- Original Message --------
Subject: Re: [micropython/micropython] Raspberry Pi Pico: nRF24L01 over
SPI (Discussion #10155)
From: Peter Hinch ***@***.***>
Date: Thu, December 15, 2022 4:08 am
To: micropython/micropython ***@***.***>
Cc: melvincramer911 ***@***.***>, Mention
***@***.***>
Options are to see if your supplier will give a quantity discount. Or buy a few cheap ones from different sources, find one that works, then buy some more.
Maybe I was unlucky, but the cheap ones I bought could barely communicate across my very small office/lab.
--
Reply to this email directly or view it on GitHub:
#10155 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello
How do I get my required library for my pico, hopefully using thonny to get the library ?
I have two pico's two nrf24l01's and two push switches.
I am trying to use this example and download the drivers ( I use thonny ), when I click on the link I to get the library, I get error message: The 'micropython/micropython' repository doesn't contain the 'drivers/nrf24l01' path in 'master'.
Here is my system:
If I use Thonny [ tools, Mange packages ] and try to install anything with nrf24 in it I get error message: this does not look like a Micropython/circuitpython package, are you sure you want to install it ?
### Here is the code:
from machine import Pin, SPI
import struct
from nrf24l01 import NRF24L01
led = Pin(25, Pin.OUT) # LED
btn = Pin(28, Pin.IN, Pin.PULL_DOWN) # button press
csn = Pin(15, mode=Pin.OUT, value=1) # chip select not
ce = Pin(14, mode=Pin.OUT, value=0) # chip enable
Addresses are in little-endian format. They correspond to big-endian
0xf0f0f0f0e1, 0xf0f0f0f0d2 - swap these on the other Pico!
pipes = (b"\xe1\xf0\xf0\xf0\xf0", b"\xd2\xf0\xf0\xf0\xf0")
def setup():
nrf = NRF24L01(SPI(0), csn, ce, payload_size=4)
def demo(nrf):
state = 0
while True:
if state != btn.value():
state = btn.value()
led.value(state)
def auto_ack(nrf):
nrf.reg_write(0x01, 0b11111000) # enable auto-ack on all pipes
nrf = setup()
auto_ack(nrf)
demo(nrf)
Beta Was this translation helpful? Give feedback.
All reactions