Raspberry Pi Pico: nRF24L01 over SPI

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ต.ค. 2024
  • Today we learn how to interface the Raspberry Pi Pico with an SPI peripheral, specifically the nRF24L01 for two way wireless communication. As always the code is available on github at github.com/tin...
    The nRF24L01 driver modules can be found here: github.com/mic...
    Time Codes:
    - Intro and demo 0:45
    - SPI 2:29
    - nRF24L01 6:23
    - Software 8:38
    - Outro 18:37
    Follow me on Twitter at / tinkertechtrove

ความคิดเห็น • 110

  • @llicommg4630
    @llicommg4630 หลายเดือนก่อน +2

    Can you please update the link for the nRF24L01 driver module for the Raspberry pico?

  • @MRINDIANYOUTUBER
    @MRINDIANYOUTUBER 8 หลายเดือนก่อน +1

    OSError: nRF24L01+ Hardware not responding pease help

  • @danielsalinaslopez3541
    @danielsalinaslopez3541 3 ปีที่แล้ว +2

    Hi! I'm trying to send and messages between a Pi Pico and an Arduino Uno but I haven´t figured out how to do it. Do u know a way to make it possible?

  • @cuttawayproductions3438
    @cuttawayproductions3438 3 ปีที่แล้ว +4

    Thank you for another excellent video!! Definitely a weekly highlight and I’m sure my local electronics store is also grateful for your content 😄. May you please include a LoRa module at some stage?

  • @larrybud
    @larrybud 9 หลายเดือนก่อน +1

    4:14 Oh for fuck's sake. I'm out.

  • @johnbrisbin3626
    @johnbrisbin3626 11 หลายเดือนก่อน +1

    Don't need any woke renaming BS.

  • @zyghom
    @zyghom 3 ปีที่แล้ว +1

    so wait: I can attach on one Pico or Pi4 1 nrf module that will be the controller, and then on 6 other Picos 1 module and 1 Raspberry can talk to and listen to 6 others, right? or in fact each of them can talk to each other even (ok, then it will be messy to handle it). To make it every power efficient, every client is only listening, once the command comes from the controller, the client does his job (i.e. get temperature, etc. from sensors connected to it) and sends back to the controller. Then it goes to sleep (RX) again. Did I get it correctly?
    Btw, what would be the advantage/disadvantage between nrf vs wifi connected client (i.e. ESP)?

  • @mariopojoy
    @mariopojoy 3 ปีที่แล้ว +4

    This is exactly what I was looking for. Your series on ESP01 helped me a lot, and now this is what I needed to port some projects from STM32 to RPI Pico... keep up the good work. I'm sure this channel will grow a lot.
    I'll suggest a second part of this one adding the MESH network capabilities of the NRF24L01.

    • @d-i-ry
      @d-i-ry 3 ปีที่แล้ว

      Hey Mario, is your project up online? I'm stuck and can't get my 2 Pico's to communicate

  • @coolcraftpe5368
    @coolcraftpe5368 3 ปีที่แล้ว +2

    It doenst work can someone please help me? I did every thing like in the video but it wont work I need Help please.

    • @cgnclk
      @cgnclk 3 ปีที่แล้ว +1

      Same :/ If anyone found a solution, please share.

    • @miguelbuitrago4405
      @miguelbuitrago4405 2 ปีที่แล้ว

      Me too. I did everything step by step but does not work.

    • @duckyblenderold
      @duckyblenderold 2 ปีที่แล้ว

      i think i got it, you need a voltage stabilizer

  • @AscensionKS
    @AscensionKS 4 วันที่ผ่านมา

    Updating your link for the nRF24L01 would be super handy.

  • @jhonsqueaks4573
    @jhonsqueaks4573 3 ปีที่แล้ว +1

    Also Could You Do A LoRa Tutorial With The PICO?.

  • @selimhancihan2520
    @selimhancihan2520 3 ปีที่แล้ว +1

    sir how can ı control 433 Mhz tranceiver and receiver with two pico one connect push button and the other connect led there are no library (virtulwire) for pico

  • @michaelbyron9688
    @michaelbyron9688 3 ปีที่แล้ว +2

    For an immense improvement in performance with the nRF24L01 set the PICO SPI baud rate to 48000 in nrf24l01.py ie change - self.init_spi(48000) ( it was 4000000 )

    • @pykid1915
      @pykid1915 2 ปีที่แล้ว

      this really worked for me✨😀, thankyou

  • @edgeeffect
    @edgeeffect 3 ปีที่แล้ว +1

    I really like your presentation style... relaxed and clear - just perfect.
    But I do wish your content was a bit more "hardcore" (less Python, more Assembly. More chips and discretes, less modules) but I also suspect that that would be kinda pants for audience development.... so ignore me and keep up The Great Work.

  • @nickfolino8228
    @nickfolino8228 3 ปีที่แล้ว +2

    If the terms master and slave offend you then you should find another hobby.

  • @harshavardhanmv198
    @harshavardhanmv198 3 ปีที่แล้ว +1

    Can u try communicating esp32 and pico with nrf24l01? I'm not able to do it

  • @ccx3-3658
    @ccx3-3658 11 หลายเดือนก่อน +1

    What a shame that you don't seem to have added to this channel for a couple of years. Your tutorials are wonderfully clear, well-presented, and helpful.

  • @sakuroyen-9924
    @sakuroyen-9924 ปีที่แล้ว

    Heĺlo ,
    I need some help i can get the data transmit and receive successfuly but the problem i get is 10-20time i send and i receive 1 time can you fix this lag delay?
    thank you in advance

  • @Gargola_Elegante
    @Gargola_Elegante ปีที่แล้ว

    Great video!!, the link for the module drivers on github doesn't work, can you please enable them again? 😇

  • @mrkumar3775
    @mrkumar3775 ปีที่แล้ว

    Can you please make a video for transmitting data pi Pico to Arduino Uno via nrf24l01 🙏🙏🙏

  • @freddiessayers7713
    @freddiessayers7713 ปีที่แล้ว

    Does anyone know why I am getting a Hardware not responding error for the board. I have followed the instructions in the video but it never seems to work

  • @raymondmichael4987
    @raymondmichael4987 3 ปีที่แล้ว +1

    Just subbed, such a wonderful work through.
    Keep them coming

  • @Solstice42
    @Solstice42 3 ปีที่แล้ว +1

    perfect for a project I have in mind - you must have been reading my mind LOL!

  • @TT3Dxyz
    @TT3Dxyz ปีที่แล้ว

    The github link is broken, is there an updated link anywhere?

  • @gregorreichel9290
    @gregorreichel9290 3 ปีที่แล้ว +1

    Could you please show what you mean with: the only difference in the software if the two picos is: ?
    I did not get the point about how to change the pipes.

    • @d-i-ry
      @d-i-ry 3 ปีที่แล้ว

      Hey Gregor, were you able to solve this? I'm stuck at the same part

    • @gregorreichel9290
      @gregorreichel9290 3 ปีที่แล้ว +1

      @@d-i-ryYes, same pipe values for sender and receiver

  • @amiramir-mt3de
    @amiramir-mt3de ปีที่แล้ว

    Hi, does this library work on esp8266 or esp32?

  • @gnollkamper
    @gnollkamper 2 ปีที่แล้ว +1

    Not only a great tutorial but provided background information in a clear concise manner. THANK YOU!

  • @wickeddubz
    @wickeddubz 3 ปีที่แล้ว +1

    Thanks! Great example, I’d be happy to see more data transmission, receiving and parsing tutorials.

  • @ribbithole4128
    @ribbithole4128 2 ปีที่แล้ว

    OSError: nRF24L01+ Hardware not responding

  • @So-Now
    @So-Now 2 ปีที่แล้ว

    Something very odd going on with your demo code, or my understanding of how these work.
    When the button changes state, it transmits the state, presumably on the tx_pipe.
    Then it returns to listening, presumably on the rx_pipe.
    The receiver receives the data without listening on the transmit pipe, where the data 'should' be being transmitted.
    Also, changing the pipes[0] and pipes[1] to exactly the same address has no effect on your code.
    It behaves the same.

  • @Mr.Leeroy
    @Mr.Leeroy 3 ปีที่แล้ว +1

    computerlivesmatter ffs

  • @technologyofwah9961
    @technologyofwah9961 2 ปีที่แล้ว

    please sir nrf24l01 & raspberry pi pico based 7 channel transmitter & reciver making vedio next please ?

  • @allthegearnoidea6752
    @allthegearnoidea6752 หลายเดือนก่อน

    Very well presented thanks

  • @MicrobyteAlan
    @MicrobyteAlan 3 ปีที่แล้ว +1

    Interesting and well presented thanks

  • @skf957
    @skf957 3 ปีที่แล้ว +1

    Good content, well presented. Thank you.

  • @carever2000
    @carever2000 ปีที่แล้ว

    Excelent video, tanks. Can you show how to use IRQ pin at nRF24L01?

  • @moadibnasir2526
    @moadibnasir2526 3 ปีที่แล้ว +1

    You are excellent

  • @tonyfremont
    @tonyfremont ปีที่แล้ว

    When using these modules, add an electrolytic cap across the power and ground pins, right on the RF module board. Otherwise, you'll have all kinds of weird problems trying to communicate, especially with longer packets.

  • @d-i-ry
    @d-i-ry 3 ปีที่แล้ว +1

    absolutely fantastic tutorial! thank you!

  • @gitasr5450
    @gitasr5450 3 ปีที่แล้ว +1

    Detailed presentation for good understanding, good.

  • @AdrianGonzalez-un6di
    @AdrianGonzalez-un6di 2 ปีที่แล้ว

    If i want create a multiCeiver is required increase the pipe´s list? or instance a new nrf object and with "for loop" start to listen each pipe one by one? thanks.

  • @Athens1992
    @Athens1992 2 ปีที่แล้ว

    Hello,
    I followed your instrcution but for some reason I can see the transmitter the led is blinking, but from the other pi pico does not read anything

  • @aem870
    @aem870 2 ปีที่แล้ว

    I have a problem. The receiver is extremely slow and unreliable, it seems like all messages are getting lost. The transmitter and receiver are only about half a meter apart.

  • @robdriessen7675
    @robdriessen7675 2 ปีที่แล้ว

    Hi Tim, wrt the AUTO-ack you smartly introduced: the code is activated with writing "0b11111000" to the EN_AA register (reg #1): nrf.reg_write(0x01, 0b11111000) # enable auto-ack on all pipes.
    The datasheet however says: "bits 6+7 are to be zero ONLY (section 9.1 Register Mapping) and use bits 0,..5" to activate auto-ack for any of the pipes 0..5. Am I missing something here ?

  • @cgnclk
    @cgnclk 3 ปีที่แล้ว

    Is is possible to get a troubleshoot on why it doesn't work when some of us try? Possible causes etc... Because i've seen a bunch of people including myself tried the very same things you showed and the LEDs don't light up on the other Pico.

  • @jayakrishnans2785
    @jayakrishnans2785 2 ปีที่แล้ว

    Hey can you please do a video on using ads1115 ADC converter on pi Pico ,

  • @ravitejakonathala547
    @ravitejakonathala547 3 ปีที่แล้ว

    Could you made video on nrf24l01 as a ble mode with Raspberry pi pico

  • @allthegearnoidea6752
    @allthegearnoidea6752 ปีที่แล้ว

    Great video and beautiful explanation. Thanks regards Chris

  • @tompaquette7138
    @tompaquette7138 2 ปีที่แล้ว

    I finally understand the SPI and i2c pin uses! Nice video. I have a question on utilization of thr feature with a developed program called lightshowpi, but even if you don't know what that is my question for now is simple enough. Can you operate csp1's gpio's in dependant of csp2's pins, both from csc's request? 2 seperate wireless gpio additions rather then extensions. The reason I ask is I'm trying to get away from 10 cords spidering everywhere from my pi4, and with a wireless receiver I hope to use minimum 2 gpio out pins for light channels. Have 6 receivers with 2 seperately controlled lights and minimum 8 controlled channels, so some receivers would be acknowledging the same command some of the time.

  • @gedtoon6451
    @gedtoon6451 3 ปีที่แล้ว

    On many Arduino/nRF24L01 projects on the web, they state that reliability can be improved by adding a 10uF capacitor as close as possible to the nRF24L01 power pins. Inexpensive adaptor modules are available that have a 3.3V regulator and filter capacitors.

  • @TheSchwarzenberger
    @TheSchwarzenberger 2 ปีที่แล้ว

    Thank you for an nice video! I wish a merry Christmas. Best regards from Germany.

  • @rungeon83
    @rungeon83 3 ปีที่แล้ว +1

    OMG YOU DID IT :D!! Hahaha thank you

  • @cnaazh6942
    @cnaazh6942 3 ปีที่แล้ว

    man, exactly what i wanted. i thought i'm gonna search for days. but OH NO it only took 5 min finding this.
    thank you soooooo much

  • @AadhaEngineeer
    @AadhaEngineeer 3 ปีที่แล้ว

    im trying to make a small car and im trying to use this pico and nrf module......how do i do that?

  • @SayantanAuddy
    @SayantanAuddy 2 ปีที่แล้ว

    Very nice video, clear, concise and informative! Thank you so much. Is it possible to do this with circuitpython as well?

  • @TheMysticABC
    @TheMysticABC 2 ปีที่แล้ว

    Fantastic series you are making regarding the PICO. I will be watching every one you make.
    Really clear instruction and your voice over is just perfect !!!
    Keep making more such videos !!!
    I have a few questions if I may.
    I have completely replicated your set up so that I can get started using nRF24L01.
    However, so far I can not get it to work
    Both Pico main.py scripts are running and I have ensured that the pipes are switched in the second Pico to ensure the TX RX side of things
    When I press the button, only the light on that Pico lights up and I get the print that shows tx1 and tx9 when you press and release the button.
    On the receiving Pico, nothing appears to be received as the rx 1 rx0 does not show. I get teh same when I press the button on the other Pico.
    I have checked the wiring of the nRF24L01 at least four times on both Picos to be really sure I have it right
    I have replaced both nRF24L01 module with new ones to make sure I do not have a bad module
    The except OSerror: is never fired off as I do not see a print for "message Lost"
    The only possible difference that I can think of so far that could be is that the version of the nRF24L01 driver might possibly be different to yours ??
    Would you have any other suggestions to make to help me trouble shoot this issue and resolve it please ??
    Many thanks

  • @leewilkins3155
    @leewilkins3155 3 ปีที่แล้ว

    Great video. I set it up on one pico, and all seems fine. However I am trying to set up a pi 4 as the receiver, and I can't seem to find a compatible library. I am novice, but I can't seem to get any of the existing libraries to work. I would love to see you connect a pico to a pi 4.

  • @josemariaterrazasmarino3190
    @josemariaterrazasmarino3190 3 ปีที่แล้ว

    great project the driver can be use for nfr24l01+?

  • @raymondmichael4987
    @raymondmichael4987 2 ปีที่แล้ว

    I spend most of my today's time learning from your videos; You have a talent when it comes to teaching, you're natural.
    Can you create another pico tutorial with GSM module, preferably SIM800L , to post sensor reading to a cloud database like mongodb or any nosql db.
    thanks and stay blessed my brother

  • @d-i-ry
    @d-i-ry 3 ปีที่แล้ว

    does your code mean to say that 1 Pico should have
    pipes = (b"\xe1\xf0\xf0\xf0\xf0", b"\xd2\xf0\xf0\xf0\xf0")
    and the other has
    pipes = (b"\xd2\xf0\xf0\xf0\xf0", b"\xe1\xf0\xf0\xf0\xf0")
    ...because the communication isn't working for me yet

    • @cgnclk
      @cgnclk 3 ปีที่แล้ว

      My code neither. When I press the button, only the Pico that the button is connected to is lighting up.

    • @duckyblenderold
      @duckyblenderold 2 ปีที่แล้ว

      @@cgnclk same

    • @duckyblenderold
      @duckyblenderold 2 ปีที่แล้ว

      i think i got it, you need a voltage stabilizer

  • @monguskooklord7867
    @monguskooklord7867 3 ปีที่แล้ว

    Helpful videos, I love this board. I've never before ventured into microcontroller land I'm usually dealing with FPGAs and very low level mixed signal/power stuff. But this thing is so easy to use I dont have to bug a software person anymore to get prototypes working :)

  • @joelreyes8459
    @joelreyes8459 3 ปีที่แล้ว

    Excellent video! do you know where we can find documentation of the other pipe line addresses? I looked in the nrf24l01 datasheet but didn't find it there.

  • @tanmayfuse1747
    @tanmayfuse1747 3 ปีที่แล้ว

    Can you please help to how we can control BLDC with rpi Pico

  • @MrRyghtHere
    @MrRyghtHere 3 ปีที่แล้ว

    Hi! Really informative video! Would love to do a project implementing these, but is there a driver for just a regular raspberry pi 4? And what differences to your code would I need to make?

  • @aremumuiz6994
    @aremumuiz6994 3 ปีที่แล้ว

    is it possible to expand or increase raspberry pi pico GPIO

  • @Terrasqule
    @Terrasqule 2 ปีที่แล้ว

    Great Video! Could you do one with two pi 4b's? I'm having trouble getting mine to work...

    • @Terrasqule
      @Terrasqule 2 ปีที่แล้ว

      NM, I figured it out.

  • @alexblunt7493
    @alexblunt7493 3 ปีที่แล้ว +1

    Your content is getting so good. Nice job

  • @shanmukbitra8839
    @shanmukbitra8839 2 ปีที่แล้ว

    Very nicely explained thank you

  • @jhonsqueaks4573
    @jhonsqueaks4573 3 ปีที่แล้ว

    Is It Possible To Use Tensorflow?.

  • @torac6989
    @torac6989 3 ปีที่แล้ว

    Im confused, got scripts working on both my nrf modules, they can both send and receive. But when I press a button only the pico connected to the button led turns on. The other doesnt get the message and led doesnt turn on.

    • @gregorreichel9290
      @gregorreichel9290 3 ปีที่แล้ว +1

      Try in nrf24l01.py in line 88: SPEED_1M or SPEED_2M self.set_power_speed(POWER_3, SPEED_250K)

    • @duckyblenderold
      @duckyblenderold 2 ปีที่แล้ว

      i think i got it, you need a voltage stabilizer

  • @TBL_stevennelson
    @TBL_stevennelson 3 ปีที่แล้ว

    I've been looking for a Video just like this I'm still in the middle of it but I looked up info to do this project last week

  • @Curiousmind-01.
    @Curiousmind-01. 3 ปีที่แล้ว

    Maybe few for now, but sir you have a subscriber from India 🇮🇳 too, 👍.

  • @aem870
    @aem870 2 ปีที่แล้ว

    Thank you. very helpful.

  • @AlexandreLefaure
    @AlexandreLefaure 2 ปีที่แล้ว

    Excellent video, very clear :)

  • @pykid1915
    @pykid1915 2 ปีที่แล้ว

    oh man you saved us ❤️😀

  • @Magicman8508
    @Magicman8508 3 ปีที่แล้ว

    Is it possible to adress more than six devices? Like giving 10 devices the same adress and using an additional device id in the payload?

    • @tinkertechtrove2910
      @tinkertechtrove2910  3 ปีที่แล้ว

      Interesting idea, I have not tried that

    • @tinkertechtrove2910
      @tinkertechtrove2910  3 ปีที่แล้ว +2

      I was thinking about this a bit more, while its unlikely that more than 6 devices can communicate directly (not tested this) it would be perfectly possible to setup a relay system. If you built an overlay network using a DHT or something (see en.wikipedia.org/wiki/Chord_(peer-to-peer) ) you could communicate efficiently between a very large number of peers, this is the same way bit torrent works.

  • @paulcottingham241
    @paulcottingham241 3 ปีที่แล้ว +1

    PC meets electrical engineering :-(

  • @D3RmahNet
    @D3RmahNet 3 ปีที่แล้ว

    Keep it up mate ❤

  • @santhoskumar2592
    @santhoskumar2592 3 ปีที่แล้ว

    Bro can we use nrf24l01 as wifi module, i mean can we connect it to cloud

    • @tinkertechtrove2910
      @tinkertechtrove2910  3 ปีที่แล้ว +1

      you may want to checkout th-cam.com/video/v_Tm_IgbRDc/w-d-xo.html

    • @santhoskumar2592
      @santhoskumar2592 3 ปีที่แล้ว

      @@tinkertechtrove2910 thank you soo much this helps in my mini project

    • @tinkertechtrove2910
      @tinkertechtrove2910  3 ปีที่แล้ว

      You are welcome 🙂

  • @MadhuKumar-hi2qs
    @MadhuKumar-hi2qs 3 ปีที่แล้ว

    I'm 911th Subscriber

  • @Mr.Leeroy
    @Mr.Leeroy 3 ปีที่แล้ว +1

    your voice recording peaks at -20db, please bring it up to -9db

  • @EvilKimau
    @EvilKimau 3 ปีที่แล้ว

    I love how with such even voice you can keep rattling off all the part names and acronyms. I would resort to saying the wireless thingy after one or two attempts.

  • @dbtest117
    @dbtest117 ปีที่แล้ว

    Oh stop it Master Slave is completely appropriate name for electric circuits.