#73 nRF24L01 Send (and receive) data with your Arduino!

Поділитися
Вставка
  • Опубліковано 4 лют 2017
  • New! ralphbacon.blog
    Use your Arduino to transmit (and receive) data reliably with this easy-to-use module.
    The nRF24L01 module achieves this beautifully - and with the excellent RF24 library from TMRh20 we can do just about anything you might think of.
    However, in this absolute beginners' guide, we just scratch the surface but still managed to produce a useful transmit and receive sketch (originally taken from the above library but simplified even further).
    The nRF24L01+ boards (but available in many places):
    www.amazon.co.uk/dp/B010N32X3U
    The breakout board that prevents power-related issues:
    www.amazon.co.uk/gp/product/B...
    The library I use is very mature, s/he has several others too. See his/her homepage here, choose the RF24 library as I showed in the video.
    github.com/TMRh20 or a copy from here:
    github.com/RalphBacon/nRF24L0... or here
    github.com/nRF24/RF24 (thanks Ed19601)
    Note that there are several good nRF24L01 libraries available out there. If you use another one bear in mind that the pin connections will be different. I chose the one above as it seemed to give us Arduinites a decent interface to the nRF24L01 module without too much mucking around.
    My sketches (one for receive, one for transmit) even though both do actually transmit anyway (remember that each module will automatically acknowledge receipt of data unless you specifically switch off that capability - why would you do this?).
    IMPORTANT NOTE: thanks to the Eagle Eyes of Arduinite viewer whitefields5595 please remember that pin 10, although not connected to the nRF24L01+ in this demo must NOT be used as a general purpose IO pin - it remains the standard CS pin of the SPI bus - and if that doesn't mean much just remember to leave pin 10 on your Uno or Nano unconnected whilst running this sketch!
    ------------------------------
    DOWNLOAD HERE
    ------------------------------
    github.com/RalphBacon/nRF24L0... --- click the Download button and choose the zip file, unzip and place each sketch in its own folder (of the same name as the sketch) in your usual Arduino sketches folder.

    If you like this video please give it a thumbs up, share it and if you're not already subscribed please do so :)
    My channel is here:
    ------------------------------------------------------------------
    / ralphbacon
    ------------------------------------------------------------------
    How can I remember this? Memory tip: "See" Ralph Bacon, geddit?
  • Наука та технологія

КОМЕНТАРІ • 753

  • @oversizedsloth3748
    @oversizedsloth3748 4 роки тому +14

    Thank you so much for this video! My class really appreciates the content you put out (our teacher showed us this video) and we are looking forward to your future videos.

    • @RalphBacon
      @RalphBacon  4 роки тому +2

      I'm glad it helped you and your classmates, GingerSkips! And thanks to your teacher for pointing you to this channel, great to have you along for the Arduinite journey. Thanks for posting.

  • @eljefe400
    @eljefe400 6 років тому +1

    there are dozens of these nrf tutorials that I have looked through (and tested many). This was the one that made it all work. Excellent Job . thank you so much for sharing. Well done!

    • @RalphBacon
      @RalphBacon  6 років тому

      Wow! that's great news, Jeffrey, although I cannot take all the credit. Albert Einstein famously said "Make it as simple as possible but no simpler". So I do. Once Arduinites have grasped the simplest example they can build on that all by themselves, usually. So thanks for endorsing my "simple" approach (my brain can't handle complex anyway!), appreciated.

  • @BOBANDERSON5150
    @BOBANDERSON5150 6 років тому

    Thank you for explaining everything down to the smallest details. Made working with these modules so much easier. Getting your example up and running made first, helped me see what goes on in the software. Thanks again, Bob. Subscribed to your channel.

    • @RalphBacon
      @RalphBacon  6 років тому

      Glad you liked it Bob, and thanks so much for subscribing too. I do like these nRF24L01+ modules, they are very powerful, especially the ones that have an external antenna (not needed for most home use unless you live in a castle). Great to hear from you.

  • @MCGearhead
    @MCGearhead 3 роки тому +2

    Fantastic tutorial! Very easy to follow and the sketches loaded up and ran without any issues. Thank you!

  • @randallknox2141
    @randallknox2141 7 років тому

    Ralph--great video! My grandson and I watched it, put together a couple of NRF24L01 circuits, put a send sketch on his laptop and the receive sketch on my laptop and it worked flawlessly the first time. We really appreciate your help. Thanks, Randy

    • @RalphBacon
      @RalphBacon  7 років тому

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      That's great new Randall, and I'm pleased you're sharing the fun with the younger generation too. Brilliant!

  • @asaadiftikhar6564
    @asaadiftikhar6564 5 років тому

    This is the only useful tutorial for beginners on UA-cam. Bless you man!

    • @RalphBacon
      @RalphBacon  5 років тому

      You are most welcome Asaad Iftikhar, I'm glad you like the video. Nice to hear from you.

  • @miniminerx
    @miniminerx 6 років тому +1

    I love your videos! The best I have found. Keep it up! I also like how you keep on uploading too.

    • @RalphBacon
      @RalphBacon  6 років тому

      You are most welcome MiniminerX, I'm glad you like the videos. Nice to hear from you.

  • @markhill8389
    @markhill8389 6 років тому +2

    Thank you so much for explaining this so clearly, i even learned how to properly add to library.
    You have made my day.

    • @RalphBacon
      @RalphBacon  6 років тому +1

      That's great news, Mark, it's not often I get to make someone's day. You may have seen the humorous quote: "I can only please one person per day. Today is not your day. Tomorrow doesn't look good either." How WRONG that is, as you have proved! Seriously, I appreciate the post and it's great to hear from you.

    • @markhill8389
      @markhill8389 6 років тому +1

      Ralph S Bacon
      Keep up the good work. I'm definitely guided by your footsteps for this rf project.

  • @minoz55
    @minoz55 4 роки тому +2

    Thank you! Your video helped me to sort it all out. The tip to open two separate instances of the IDE: Wow!

    • @RalphBacon
      @RalphBacon  4 роки тому

      And I'm very glad about that, Thomas, if this channel helps in any way then I have succeeded. Thanks so much for posting.

  • @stevea3717
    @stevea3717 7 років тому +2

    Hello Ralph, thank you for a great tutorial .It worked straight away for me . this is an excellent platform for newbies to start from ,very simple and easy to understand .This can be the basis of many projects. Well Done! Keep those videos coming.

    • @RalphBacon
      @RalphBacon  7 років тому

      Glad you liked the video Steve. +Raad Yacu (see below) reminds us all that the data length is limited to 32 bytes at a time. I will have to look at the libraries for this device to see how they get around that (probably multiple transmits). Thanks for posting!

  • @wolenyo
    @wolenyo 4 місяці тому +2

    Oooh, Mr. Ralph, THANKS SO MUCH!! I've watched a lot of tutorials on YT and not a single one has given me code that works, until I found your video. You've now erased hours and hours of frustration that I've accumulated from my other attempts. Great job with this video, Mr. Ralph! I will definitely check out your other videos. Excellent teaching style. Thanks again!!

    • @RalphBacon
      @RalphBacon  4 місяці тому +1

      Glad it helped! And you're Welcome! Glad you got it working.

  • @tonydonnelly
    @tonydonnelly 7 років тому

    I just received my NRF24L01 modules that I ordered off of ebay 4 months ago, so I'm quite anxious to give them a try. Your tutorial is a fantastic jumping off point. Thanks!

    • @RalphBacon
      @RalphBacon  7 років тому

      Yes, indeed, Tony, just follow my video *exactly* and you will have no issues. And if you have not yet bought the (very cheap) adapter plates for these modules do so *now* as it sorts out all the power issues that people stumble over! Great to hear from you.

  • @tonybell1597
    @tonybell1597 7 років тому

    Ralph, thank you soooo much for this video, found your channel this weekend...... have been wrestling with these little blighters for for ages, couldn't get anything working, this has re-kindled a project idea I have had a for a while... thanks.... keep up the good work!

    • @RalphBacon
      @RalphBacon  7 років тому

      Welcome Tony! Yes, once you have a demo it all becomes very simple, does it not? I'm hoping your interest extends beyond nRF24's and into all things Arduino, in which you have definitely found a channel for you! Enjoy (and subscribe if you think this is for you). Good to hear from you.

  • @markchurch8037
    @markchurch8037 6 років тому

    I found this tutorial very clear to understand well explained in layman's terms for us beginners i look forward to viewing more of your tutorials in the near future, Thank you very much Ralph . Mark

    • @RalphBacon
      @RalphBacon  6 років тому

      Thanks for your kind words, Mark, I'm very glad you found it clear and easy to understand - especially for beginners. That is the whole point of my UA-cam channel. Great to hear from you.

  • @tbddevelops
    @tbddevelops 7 років тому +9

    Really clear tutorial and has encouraged me to pick these back out of my electronics bin. Thank you.

    • @RalphBacon
      @RalphBacon  7 років тому

      Glad it has inspired you to re-try these devices, Terry, they're pretty easy to set up (usually!). Thanks for posting, good to hear from you.

  • @stevenalbright3363
    @stevenalbright3363 7 років тому

    Thank you very much, this really got me understanding the NRF24L01 and its up and running great.

    • @RalphBacon
      @RalphBacon  7 років тому

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      Glad it helped you, Steven, that's what this channel is all about!

  • @airthrow
    @airthrow 6 років тому +1

    By far the best NRF24L01 tutorial on YT, can't believe how frustrating this can be. Hope I am up and running tonight with your assistance, thanks!

    • @RalphBacon
      @RalphBacon  6 років тому

      Let's hope you're successful, do let us know!

    • @airthrow
      @airthrow 6 років тому

      I've got the library installed fine and the transmitter code uploads fine to my Uno! However, the code fails to upload to my pro micro (other example sketches and ones I have written upload to this pro micro fine, but I just bought it)- is the code incompatible with a Pro Micro? Because I was have space constraints with the transmitting device. Thanks for the help, I feel confident with some fiddling I will finally get it!

    • @RalphBacon
      @RalphBacon  6 років тому

      If you have selected the correct board / CPU / speed etc then it should upload. I choose the Leonardo board for my Pro Micro (from Sparkfun) and my computer even says these on the COM port allocation - check there too, see how it identifies itself. Take care with this board, as it's easy to brick it (I did a video on that too). TBH I'd try a Mega if you can't get this working, you can get one for about £5 / $6.50 from the Far East these days, which will sort out your memory constraints.

  • @fasihullahsaleem
    @fasihullahsaleem 2 місяці тому

    Great Sir, I have watched so much videos and non of them worked for me. I thought it maybe due to the noise but your single code worked for me and my wasted days are paid off. Thank You Sir.

  • @shiister
    @shiister 6 років тому

    Thank you for this video. I am using this to confirm all the NRF24L01 I ordered are functioning.

    • @RalphBacon
      @RalphBacon  6 років тому

      Yes, indeed, shiister, this would be a very good sketch to prove that the units work as expected. Thanks for suggesting this and for posting.

  • @Vhbaske
    @Vhbaske 4 роки тому

    I tried during a whole month to have some success with the nRF2401 modules, I almost abandoned Arduino programming for my dissilutionment, until, mr. Ralph Bacon appeared in my UA-cam browsing. The first moment, the sketches worked, and he explained here why you make the regular mistakes we make with these modules! Thanks, Mr. Bacon, and may you have good health to keep teaching us as you do.

    • @RalphBacon
      @RalphBacon  4 роки тому

      I'm very glad it helped you, Pedro, thanks for letting me know of your success!

  • @JulioSalim
    @JulioSalim 6 років тому

    Excellent explanation. I've just reproduced at my lab with two Arduinos Pro Mini and it is working very well.

    • @RalphBacon
      @RalphBacon  6 років тому

      Excellent news, Julio. Did you use the adapters to plug in the nRF24L01 modules? If not, get some (they are very cheap, I got mine from Amazon) and prevent lots of problems due to the power being insufficient at anything above Minimum Power Level!

  • @nolihernandez
    @nolihernandez 4 роки тому

    nothing compares to British education - great learning resource that actually works mate! thanks!

    • @RalphBacon
      @RalphBacon  4 роки тому

      Glad it helped, Noli, thanks for posting.

  • @topquark22
    @topquark22 10 місяців тому +5

    For the integrated Nano3/nRF24L01 modules, you need to use CE=10 and CSN=9. This is opposite from what's given in all online examples I've seen. It caused me endless confusion until I followed the traces on the board to the pinout of the chip! People need to get in this habit and stop posting confusing information!

    • @RalphBacon
      @RalphBacon  10 місяців тому +3

      You know how it is, Cut & Paste from one example to another.

  • @robertpatton6700
    @robertpatton6700 7 років тому

    The video helped, I had stayed away from the nRF24L01 as they seemed to complicated. Thanks I plan to order some and give it a try.

    • @RalphBacon
      @RalphBacon  7 років тому

      That's great news Robert! Let's face it, if you replicate exactly what I had in the video (with or without the adapter although I recommend those too, especially for anything other than low power usage) then it's going to work. So you have a working prototype that you can then enhance it to suit. Glad you feel inspired, thanks for posting.

  • @BenDover-ci2wi
    @BenDover-ci2wi 7 років тому +1

    Thank You very much for this tutorial. I finally menaged to get this thing working :)

    • @RalphBacon
      @RalphBacon  7 років тому

      Hey Ben, I'm trying to interpret your post's meaning:
      1. After a lot of trouble following your video, Ralph, I FINALLY got it working anyway.
      2. I've had this unit in my box of components for ages and now thanks to your video, Ralph, I've FINALLY got it working.
      I'm hoping it's #2, especially as you are good enough to post your thanks here, which I humbly accept. Good to hear from you (and I knew what you were saying but it's Sunday afternoon so a bit of humour is OK here, right?).

    • @BenDover-ci2wi
      @BenDover-ci2wi 7 років тому +1

      Yes it is :) Now I can move on with my project. I subscribed your channel and hope you will keep up the good work.

  • @tino8015
    @tino8015 3 роки тому +1

    Such a good video, I was about to quit trying to program these antennas, but this video saved me, thanks.

    • @RalphBacon
      @RalphBacon  3 роки тому +1

      Great to hear! They are very good modules (but be aware - and beware - that there are fakes out there, always get original Nordic devices).

    • @tino8015
      @tino8015 3 роки тому +2

      @@RalphBacon thanks for the answer, and i'm sad to announce that mines might be fake cause I tryed every tutorial out there, copy and pasted the code. But no signal reveived or sent. I will buy some new ones thanks for telling me. Btw I got the ones sold by WayinTop, they are the only on amazon( the ones with the antenna).

  • @johnmellor6065
    @johnmellor6065 4 роки тому

    just built the above circuit and really made up as this is my first success on arduino wfi using nrf24lo1 thanks alot

    • @RalphBacon
      @RalphBacon  4 роки тому

      Well done, John, so glad it worked for you. Thanks for posting.

  • @Zubin19
    @Zubin19 6 років тому

    Dear Ralph, Firstly Congratulations and thank you so much on a brilliant piece of work on nrf24l01 module. I have been watching a lot of videos with respect of IOT and especially on Arduino and trust me this was so simple and easy to understand am very sure Albert Einstein, would be super proud of you.
    I am yet to lay my hands on this both the Arduino & nrf24l01 and will keep you posted on the results that I get.
    Thank you once again for your efforts, God Bless.
    Best Regrads
    Zubin.

    • @RalphBacon
      @RalphBacon  6 років тому +1

      Glad you found it useful and easy to follow. I think Mr Einstein would say that I could have made it even simpler but, hey, it's a good starting point. When you order the nRF24L01 modules DO remember to order the adapter plates too. Makes everything much easier (and safer) to wire up.

    • @zubinhakim2147
      @zubinhakim2147 6 років тому

      Dear Ralph,
      I finally managed to build the solution at home and it worked just as expected. I did mess up with the Pins initially as I was doing this exercise by looking at 2 different videos, but then it was good to make a mistake and I realized that using a wrong pin the Transceiver looped into itself. I am yet to receive those adapter plates that you mentioned, they are on their way. Thank you once again for your efforts and time that you took to post this video.
      I shall keep you posted on my next work that I plan to do on this. I plan to extend this exercise to switch on and off a relay to switch on and off a bulb. Till then Good Bye and God Bless.

  • @rosswaring2835
    @rosswaring2835 3 роки тому

    This video was super helpful in getting my self balancing robot and remote controller to work. I would have spend days sorting it out otherwise! Thanks Ralph!

  • @Ilikeridin
    @Ilikeridin 5 років тому

    Thank you for the tutorial. I’ve watched a bunch but this is the first which I’ve followed. Worked a treat.
    The only error which I ran into was I used an external power source and forgot to ground a board. Obviously worked straight away once I realised the problem.
    Again, thank you.

    • @RalphBacon
      @RalphBacon  5 років тому +1

      Glad it worked, Chris, I hope you're using the adapter boards?!? Cheap and save a lot of heartache.

    • @Ilikeridin
      @Ilikeridin 5 років тому

      Ralph S Bacon I am not. Not been doing this long but a lot of parcels are starting to arrive from China ha. I’ve ordered one today. Couldn’t find one for a Pro Mini, so will make something similar on perf board. Cheers

    • @RalphBacon
      @RalphBacon  5 років тому +1

      I was referring to the adapter boards for the nRF24L01+ modules.
      If you use them bare (like I did in my video, I know, bad example) you have to wire them "from underneath", easy to get wires crossed (don't ask me how I know this) and the power for the 3v3 module cannot be successfully supplied by the 3v3 pin from the Arduino unless you're using the lowest power possible (like my demo).
      Once I got the adapter boards it was *so* much easier to wire up and all power issues disappeared because you supply the adapter board with 5v not 3v3 and the Arduino has enough 5v current to go around!

    • @Ilikeridin
      @Ilikeridin 5 років тому +1

      Ralph S Bacon I did use the adapter boards but I want to use them within a project with everything powered by 3.3V. So I was considering not using the adapters. So I’m glad you mentioned that, as it probably wouldn’t work. I’ll have to supply the Pro Mini with 5V and take a supply from the source for the nRF24L01+

  • @victormironescu
    @victormironescu 3 роки тому

    Very clear tutorial, Thank you.

  • @Fogaata
    @Fogaata 6 років тому

    Masterful, thank you very much!

    • @RalphBacon
      @RalphBacon  6 років тому

      You are most welcome Fogata, I'm glad you like the video. Nice to hear from you.

  • @jeffbeck6501
    @jeffbeck6501 6 років тому

    AFTER 1,000,000 TRIES, WITH 100,000 PIECES OF CODE, THIS IS THE FIRST ONE THAT WORKED. THANKS. I have never had a harder time with a piece of code and devices. How ridiculous this took so long. It must have been just a combination of many things. I can now finally do stuff. Great tutorial. Subscribed. Thumbs up. Thanks.

    • @RalphBacon
      @RalphBacon  6 років тому

      I can feel your relief from here, Jeff, and it is so rewarding that I can help people get their projects off the ground. Thank you so much for posting this, it's feedback like this that keeps me going! One caveat: are you using the plug-in adapter boards for this device? If not, do yourself a huge favour and get them, they are really cheap (even on Amazon) and stop any power supply-related problems down the line. Thanks again for posting, great to hear from you.

    • @jeffbeck6501
      @jeffbeck6501 6 років тому

      Absolutely I am using them, thanks. I tried one time for 3 weeks using the high powered versions and I could never even get them working. This time I bought the normal versions, plus the adapters, plus your code, and finally it worked. Now that I have this working, I will go back and test the high powered versions. You do a really great job with your videos. It is the clear thinking and clear explanations that people appreciate. I need to check out some of your other projects. I see one there with EEPROM basics. That was another hurdle I had to get over as well. None of this stuff is simple when you combine all the hardware, software, and gotchas. I don't have a youtube channel but I do have some really cool projects related to some of your stuff. I may send you some links someday so you can check them out. ...because most people I know are just not interested. They just don't get it.

    • @RalphBacon
      @RalphBacon  6 років тому

      Some people "just don't get it" in the same way that I just don't get sport. Really. I just don't care about football, rugby, tennis, golf... the list goes on. I probably watch about 5 minutes of sport a year on the TV. I just don't get it. People are different I guess, thank goodness, imagine if there were more of me! But keep going, Jeff, because you *do* get it.

  • @willofirony
    @willofirony 7 років тому

    Excellent Video, Ralph. The R24 looks to be a Godsend. They appear to have encapsulated a LOT of admin and distilled the developers contribution to be no more complicated than using Serial. As to dupont cables: positively the worst plasticine I have ever tried to use. Keep up the good work Ralph. Brilliant channel!

    • @RalphBacon
      @RalphBacon  7 років тому

      You're too kind Michael (but I'll take all the praise I can get)!
      Yes, I like these little RF24 units. I was going to use them to monitor my water tanks et al in the attic but I think I might use an ethernet enabled Arduino instead (my next video, oops, spoiler alert). BTW I like dupont cables (I have dozens, all lengths and configurations) but if you ever strip the insulation hoping to use them as real cables to wire stuff up with, then -- don't! They only have about 6 strands in them! OK for breadboard lash-ups but no good for real project work.
      Thanks for posting, good to hear from you.

    • @willofirony
      @willofirony 7 років тому

      Thanks for the heads up on stripping Dupont wiring. I have found similar results when trying to strip the cables that come with "wall wart" power supplies. It is almost as if the insulation is just sprayed on to copper strands as fine as human hair.
      Your thoughts on using ethernet instead of the RF24 units are interesting. I was thinking of using the RF24s in place of ESP2866 wifi units.; having the various nodes communicating with a base which is also in circuit with just one ESP8266. The base would thus handle the IOT & time-of-day admin for all the nodes; including buffering node data, should the WiFi router (or the ISP network) go down temporarily. Do you suspect the reliability of a network of RF24s?

    • @RalphBacon
      @RalphBacon  7 років тому

      I don't suspect the reliability of a network of RF24s but you can only use about six, I think, without creating a mesh. But the same chap who wrote the RF24 library I used also has a library for that. I suspect it's a bit more work for you but you can read up about and then decide. I like the idea though, of a network all controlled by an ESP8266 hub. Your house will be truly part of the IoT movement!

  • @1larrydom1
    @1larrydom1 7 років тому

    Ralph, just subscribed after watching this video. I am working on getting analog sensor information back to an Arduino in the sun room that runs my irrigation. I didn't want to lay cable to the sensors to cover the 30 feet or so, so I ordered 2 of these to do the trick. Your video helped a great deal as my garden irrigation project is my first one! Just have to now learn how to send the data from the sensors back to the main Arduino. Thank you again for the well thought out presentation.

    • @RalphBacon
      @RalphBacon  7 років тому

      Hello Arduinite! I'm currently on vacation 5,000 miles away from home so I'll have to be brief with these comments until my return, mid-July.
      I'm so pleased it helped you, Lawrence (Larry?), really I am. Remember that although I have called one a transmitter and one the receiver, they BOTH send data to each other in my demo, it's just the transmitter that initiates the whole process.

    • @1larrydom1
      @1larrydom1 7 років тому

      Ralph - I hope you enjoy holiday, and thanks for the reply. I am awaiting the modules to regulate the 5v to ease the hookup. I certainly do remember that both units talk to each other. Once the modules come, I will start trying to get the soil moisture sensor and the rain sensor to transmit back to the main unit. One idea I had to prevent, or at least slow the corrosion of these sensors, was to power them on only when I need a reading, about once every half hour. Lots to figure out still!! Larry

    • @RalphBacon
      @RalphBacon  7 років тому

      Yes, exactly what I do for my rain sensor. Power it up, take a reading, power off. No noticeable corrosion after several weeks. But mine are not buried in damp soil so your mileage may differ!

  • @ThuanDuong-pv3xu
    @ThuanDuong-pv3xu 5 років тому

    Thank you so much from your lenson !

    • @RalphBacon
      @RalphBacon  5 років тому

      Thanks for your post, Thuan Duong, good to hear from you.

  • @LucaDiStefano
    @LucaDiStefano 3 роки тому

    Couldn't be any clearer than this. Thanks :)

  • @tropicaljantie
    @tropicaljantie 7 років тому

    I am going to try to apply this.

    • @RalphBacon
      @RalphBacon  7 років тому

      Indeed, Jan, go for it. BUT please take note of the following, to avoid some of the "speed bumps" that others have come across.
      1. Use the adapter plates for the nRF24L01 boards! They avoid all sorts of power issues that manifest themselves, and make it easier to connect the device using Dupont cables (as the cables are on TOP of the board not underneath it).
      2. Use the EXACT same sketches that I have used (one as the 'master' transmitter, one as the 'slave' receiver that also transmits back a reply.
      3. Use the exact same nRFL01+ transceiver modules that I have used - others have discovered that different modules won't, for example, allow you to transmit at 250kbps (and who knows what other differences there might be!).
      And do let us know when you have it all up and running! Good luck.

  • @gsambolin
    @gsambolin Рік тому

    Great video thanks !

  • @sameerk12982
    @sameerk12982 4 роки тому

    Hello from India.... Thank you very much Sir for the great tutorial ...I am planning to make water level indicator for water tank in my house which is on first floor and should send data at ground floor... So planning to use this transceiver..your tutorial is great help.

    • @RalphBacon
      @RalphBacon  4 роки тому +1

      That sounds like a great way to use this device, Sameer. Good luck with your project.

  • @billglass5160
    @billglass5160 2 роки тому +1

    Channel 124 is a good one for me here in Grenoble, France. Thanks for the tip, Ralph!!!

    • @RalphBacon
      @RalphBacon  2 роки тому

      Fantastic! Well away from microwave ovens!

    • @billglass5160
      @billglass5160 2 роки тому

      @@RalphBacon Default channel gave short range (2 meters). I live in a WIFI jungle. Channel 124, 2 brick walls, 2nd floor, and my birdnest breadboard yields 0/100 CRC errors. Waiting for LNA with antenna to top this score.

  • @BEGRProductions
    @BEGRProductions 6 років тому +13

    **READ**
    Ok, to try to save everyone the headache I had when trying to replicate this tutorial, follow these steps.
    1. DELETE all other RF24 libraries you have on your computer, they're not all the same even if they have the same name and seem to have similar functions.
    2. Down Ralphs's folder (includes a wiring schematic, sketches shown in the video, and the library) provided in his description.
    3. Add RF24 library from downloaded folder in step 2
    4. Open Ralph's sketches and see if they're working as shown in the video. If they are, then tweak to fit your own design.
    I spent a lot of time trying to make this example work on a different library (same name) I had installed on my computer. It almost worked, but the data got stuck sending it back to the master.
    Thank you so much Ralph for helping with this excellent, concise and organized tutorial.

    • @RalphBacon
      @RalphBacon  6 років тому +1

      Thanks for posting this, it will sure help everyone who tries to follow this demo, that's for sure.

    • @Taran72
      @Taran72 5 років тому +1

      It's definitely helping me! I couldn't get it to work even after I soldered a 10uF capacitor to the NRF module. :) I will follow your instructions and hopefully I'll be ok. :)

    • @Taran72
      @Taran72 5 років тому

      I just did that and it doesn't work: I'm not quite sure why. I tried another code and that other one works. Could it be something about the module I'm using? Maybe it's a cheap brand and it may not be reliable? Is there a way that I can do a step by step check?

    • @alexliu694
      @alexliu694 5 років тому

      @@Taran72 BIG OOF

    • @Taran72
      @Taran72 5 років тому

      @@alexliu694 : I'm learning....just asking a question. :) By the way, since I added this comment I managed to resolve all the issues I had. :)

  • @meynardsonmagoli5211
    @meynardsonmagoli5211 11 місяців тому

    Very nice!

  • @jacobendure262
    @jacobendure262 5 років тому

    Yes, I also tried a number of NRF24L01 transceiver project some worked but soon after they stopped for no apparent reason. I am quite sure it had to do with interference from other channels so the key difference here is the line: // Use a channel unlikely to be used by Wifi, Microwave ovens etc
    radio.setChannel(124); I just started it an hour ago and it's still going!
    Thank you so much !

    • @RalphBacon
      @RalphBacon  5 років тому

      You are most welcome Jacob Endure, I'm glad you like the video and found a solution. Nice to hear from you.

  • @tukukode
    @tukukode 4 роки тому

    Thank you so much 😊👍

  • @whitefields5595
    @whitefields5595 6 років тому +10

    Transmission of multiple variables
    As a give-back to the channel, here is the code to use if you want to transmit multiple variables. It uses structures in C. Note each variable can be any data type and all can be different (int, float, unsigned long). However the max size of the whole package is 32 bytes = 256 bits
    TRANSMITTER ...
    // Top of file, in declarations, before SetUp
    typedef struct{ //declare the structure for transmission
    int A0; // 16 bits
    float Temp; // 32 bits
    unsigned long Heartbeat; // 32 bits
    // add next one(s) here, but keep total struct package size to 256 bits (= 32 bytes)
    } xfer; // name of the structure above
    xfer TXpackage; // TXpackage is a type of structure xfer
    void loop(){
    // read the sensors and put the elements into the structure
    TXpackage.A0 = analogRead(A0);
    TXpackage.Temp = sensors.getTempCByIndex(0); // Read Dallas18B20 on OneWire
    TXpackage.Heartbeat = millis()/1000; //used as a heartbeat to confirm transmission
    // add the next one(s) here
    radio.write(&TXpackage, sizeof(TXpackage));
    ---------------------------------------------------------------------------------------------------------------------------------------
    RECEIVER ...
    // Top of file, in declarations, before SetUp
    typedef struct{ //echo the structure so variables can be received in the same order
    int A0;
    float Temp;
    unsigned long Heartbeat;
    } xfer;
    xfer TXpackage;
    radio.read(&TXpackage, sizeof(TXpackage));

    • @RalphBacon
      @RalphBacon  6 років тому +5

      Excellent contribution, whitefields5595, very useful and easy to follow using a struct, an underused data structure that is so easy to use.
      Thanks for contributing this.

    • @jzmartin11
      @jzmartin11 3 роки тому

      Makes life a lot easier, thanks

  • @artbecker5618
    @artbecker5618 7 років тому

    I have several of the power adapters shown at 4:26. They can be used without a breadboard by using the 8 connectors on top; 2 each 5v & 3.3v plus 4 ground pins. Stick the pins on the bottom in a piece of non-conductive foam to protect them.

    • @RalphBacon
      @RalphBacon  7 років тому

      A great way of using those power adapters, Art, thanks for pointing this out. A clever piece of lateral thinking, that they don't *need* a breadboard to work! Thanks for the post, others will doubtless find it useful too.

  • @szehenry
    @szehenry 6 років тому

    Very clear and simple. Big thanks for making it. Btw, it would even better if you put the wiring section at the end of video to the front. Tks!

    • @RalphBacon
      @RalphBacon  6 років тому

      True, sze Henry, true, and hindsight is a wonderful thing. I think we all should have more of it! But I'm glad you like the video, they are really quite wonderful modules, especially when used with their adapter plates. Thanks for posting.

  • @HaseebAdnan0
    @HaseebAdnan0 6 місяців тому +1

    So i commented 2 days and some hours ago that PA+LNA modules were not working. What i had done was i had plugged the antenna into a breadboard to kind of understand better(although it was harder to understand), then the breadboard forwarded the connections to arduino uno, effectively using 2 cables. Turns out my code wasnt working properly because the wire length does matter, cuz we are in the Microseconds. Thanks SIr and the guy who commented about using shorter wires down in the same video!!!

    • @RalphBacon
      @RalphBacon  6 місяців тому +1

      Does the module not just have a standard IPEX connector, or something else where you connect the antenna directly?
      Mine certainly have an IPEX connector (I chose them because of this) so no wires to solder at all - precisely because of the issues I knew could be lurking which you have discovered (and fixed 👍)

    • @HaseebAdnan0
      @HaseebAdnan0 6 місяців тому +1

      idk what ipex means but it could mean 8 pins that are easily connectable, in this case, unlike cameras that need to have an adapter board. I thought it would be easy for me to connect the antenna to the breadboard and remember the configuration 1,3,5,7,2,4,6,8 pins and wire that way.@@RalphBacon

    • @RalphBacon
      @RalphBacon  6 місяців тому +1

      The IPEX connector is a tiny gold circular connector on board (only about 3mm diameter), to which an aerial cable snaps into: bit.ly/ipex-and-cable
      But I have also used this type where the antenna screws directly into the module: amzn.to/3GBdxZu
      Just easier than trying to wire up an antenna.

    • @HaseebAdnan0
      @HaseebAdnan0 6 місяців тому +2

      @@RalphBacon oh i have an old remote with 2 ipex connectors, it has a fulhan microprocessor which is a chinese company, i couldn't find any documentation for it. But these have screwable antennas here.

  • @TOMTOM-nh3nl
    @TOMTOM-nh3nl 4 роки тому

    Thank You for the Tut

  • @whitefields5595
    @whitefields5595 6 років тому

    Ralph, Followed this and it all works OK, so thanks. I bought the bare bones NRF24L01 board in Jan 2018 which may not have been available when you first made this video. The board terminates in 8 holes in a line (not breadboard friendly though as pitch is small), but I wanted minimal size.
    I soldered wires onto these pins and connected as follows
    nRF pin 1 is TOP RIGHT if you hold it with the pinouts uppermost and chip facing you ....
    nRF24L01 pin Arduino pin
    1 VCC 3.3 V from external source
    2 GND GND
    3 CE 7
    4 CSN 8
    5 SCK 13
    6 MOSI 11
    7 MISO 12
    8 IRQ GND note the IRQ is not used here so tied to GND for safety
    I did not add any external capacitors or other componentry. If you add this to your next update others will benefit.

    • @RalphBacon
      @RalphBacon  6 років тому

      Interesting development there, whitefields5595. Is it one of these (from AliExpress): www.aliexpress.com/item/2PCS-2-4G-nRF24L01-RFID-Wireless-Transmission-Module-2dBm-1mW-2-4GHz-wireless-adaptor-100m/32848645230.html
      I notice that you are supplying 3.3v from "an external source" - as long as it's not an Arduino then that will prevent a lot of power-related issues that everyone seems to have (who does not use a 5v adapter board). Thanks for the heads up.

    • @whitefields5595
      @whitefields5595 6 років тому

      Ralph, yes it is similar to the one in your link. I traced the terminations back to the chip. It is not a good idea to use the Arduino as a power supply, and you have pointed this out. I think you should stress it every time as newcomers may become complacent. One of the first things to go wonky is the Arduino's A/D converter. The adapter boards you use are as cheap as chips ;)) so there is no excuse for not doing things correctly. You have to do it right in the project, so start the way you mean to go on. Of course, none of this high moralising is a result of experience as I would never dream of doing it..

    • @RalphBacon
      @RalphBacon  6 років тому

      Ha ha! Of course not, we all do it right first time every time, right? That said, my video shows that I didn't use the adapters for the demo, but I was irritated by the wiring from below and as Amazon were doing them cheap as chips it seemed obvious to try them out. Cranking up the power was then fault free. Thanks for the update, I will take note of these new offerings.

  • @webslinger2011
    @webslinger2011 4 роки тому

    Nice! I didn't notice there was an option to send audio using an rf24. Gotta explore that in the future.

    • @RalphBacon
      @RalphBacon  4 роки тому +1

      Sending audio is tricky. Here you have just 32 bytes max to send in a single packet. Given that a simple .mp3 will have some 4Mb for a quality CD track, that's a LOT of packets. There's probably a better way to send audio, probably BT.

  • @binarybox.binarybox
    @binarybox.binarybox 6 років тому

    Today, I connected together a couple of nRF24L01 with adapter boards using two nano arduinos on breakout boards. One unit had a pot and the other nano had a servo connected. Servos cause current surges and need a 10uF 25v cap and without it, the servo doesn't work. I fitted a tantalum cap to both nRF24L01 boards between GND and VCC near the xtal and the servo worked really smoothly. I followed Howtomechatronics video. Dan does say a cap is needed. Hope this helps anyone having problems with the nRF24L01.

    • @RalphBacon
      @RalphBacon  6 років тому

      Excellent, thanks for sharing that useful tip, Binary box.

  • @mortalrahu
    @mortalrahu 5 років тому

    Thank you very very very very much

    • @RalphBacon
      @RalphBacon  5 років тому

      You are most welcome rahul gupta kodarapu, I'm glad you like the video. Nice to hear from you.

  • @MDFRESCUER
    @MDFRESCUER 7 років тому

    Good video.

    • @RalphBacon
      @RalphBacon  7 років тому

      Nice to hear that MDF Rescuer, I hope you enjoy the other videos too.

  • @aarongellado9547
    @aarongellado9547 5 років тому

    IT WORKS!!! I've been trying multiple tutorials. Yours was the only one that worked for me. Could you try doing an NRF24 network next?

    • @RalphBacon
      @RalphBacon  5 років тому

      You sound surprised, Aaron! No more than me, really. 😱
      But I'm not going to do a (mesh) network though, sorry, as I have no need and it just seems like an overly complicated way to send data around! There is a demo sketch in the stuff I put on my GitHub so you could always have a go. May the force be with you...
      Thanks for posting, good to hear the positive feedback.

  • @nastynxt
    @nastynxt 6 років тому

    very helpful

    • @RalphBacon
      @RalphBacon  6 років тому

      Thanks for that, Nitin Dangwal, nice to hear from you.

  • @mostafasohrabi5634
    @mostafasohrabi5634 Рік тому

    good video.

  • @demetriosdemetriou1114
    @demetriosdemetriou1114 7 років тому

    Yes it does the random numbers communication is perfect
    also the pulses from the digital potentiometer I can see them on the transmitter also the pulses. on the receiver side I see the random numbers produced but nothing of the potentiometer. God bless you thank you

    • @RalphBacon
      @RalphBacon  7 років тому

      OK Demetrios, that is good (I asked because some viewers are having difficulties in getting that demo sketch running, probably as a result of noisy power issues or frying their nRF24L01s by using 5 volts).
      What you need to do is read the potentiometer value via the analog port (you suggested A1) then transmit that *instead of* the random number. However, in my demo sketch I am only transmitting ONE BYTE - which can contain a maximum value of 255 whereas the analog value can be from 0 to 1023. So for test purposes only, you can *map* the analog value to a range of 0 - 255 like this (which I have demonstrated in other videos):
      char getPotValue() {
      int potValue = analogRead(A1);
      return map(potValue, 0, 1023, 0, 255);
      }
      Which means, take the potentiometer value and constrain it from its value of between 0 and 1023 to the new range of 0 and 255.
      I'll leave you to experiment but this should be very straightforward (and help on the *map* command is on the Arduino.cc web site too).
      Good luck!

  • @DrexProjects
    @DrexProjects 7 років тому

    I have a 1/2 dozen of these and never used them. My plan was to have 1 in each greenhouse ( 3 at the moment ) to transmit temp, light level and such back to the main house and to the IOT thing. ( Mobile App thing ) Perhaps it's about time I started getting familiar with these devices. Thanks for the kick in the ass to get me going.

    • @RalphBacon
      @RalphBacon  7 років тому +1

      Indeed, Darrell, consider this an Arduinite kick in the ass!
      Now that you have an ultra-simple demo to follow, I reckon you'll only have to change the amount of data to transmit. If you make a fixed string size (temp + light level + humidity + whatever) as a string or char[ ] then you will have no trouble doing this. It's how I did it in my 433Mhz rain sensor project a while back. In some ways I wish I had used this nRF24 device if only because it guarantees reception (or tells you it failed). That said, my rain sensor project has worked beautifully ever since I installed it so maybe I have a (new) solution looking for a problem (and what's wrong with that? heh heh!).
      Anyway, I hope this has fired you up to get that greenhouse project underway ready for the Spring 2017 (assuming you live in the northern hemisphere).

    • @DrexProjects
      @DrexProjects 7 років тому

      Spring will be here any day now as I live on Vancouver Island In Western British Columbia. Although for a known mild climate this year winter is sticking around much longer than usual. Global warming my ass.

    • @RalphBacon
      @RalphBacon  7 років тому

      I shamefacedly admit to having to look up that location, Darrell, but having discovered it is in Canada, no wonder it's cold! I think UK weather is sometimes weird but at least we don't have bears wandering around . Now if you could just slip a nRF24 on a collar round a bear's neck to track him that would be a good project...

  • @michaelstevens630
    @michaelstevens630 7 років тому

    Hi Ralph, a nice simple explanation of these little modules. I bought two over a year ago and never did anything with them. Time for a project I think. Have enjoyed watching several of your videos. Can we see more of Benny the Cat?

    • @RalphBacon
      @RalphBacon  7 років тому

      Ha Ha! Benny is definitely getting star-struck, Michael, there will be many opportunities I'm sure where Benny will set me straight. Glad you liked the video and even better that you are now enthused into getting this little beauties working (I've just ordered a set of 10 from Amazon UK for the SAME price as they were selling for in China - not sure how they managed this but I've now got them delivered today). I can see many uses for these going forward. Thanks for posting and I'll let Benny know too. :)

  • @drelmetbrown
    @drelmetbrown 4 роки тому

    Works well Ralph thanks, didn't initially though but my nano's 3.3v output is 3.5v and i suspect there is noise on the line, scope not to hand at the moment) A 47uf on each nrf sorted for now until i use the adaptors.

    • @RalphBacon
      @RalphBacon  4 роки тому +1

      Oh, yes, do get the adapters, Emmett, it just makes using these great transceivers so much easier. Glad you got it all going without them though! Thanks for posting.

  • @giniterminator
    @giniterminator 7 років тому +3

    Hello Ralph, this is the best explanation about nrf24l01! Just one question. How do you send more the one variable in one package? Thanks.

    • @RalphBacon
      @RalphBacon  7 років тому +2

      Hi Gustavo! The way I would do it is to send either a concatenated fixed length string of several variables, or, if you can't be sure of the length, separate them with a delimiter such as a "|". Convert all the variables to strings if you do it this way. Then reconstruct them at the receiving end. I might be tempted to use a struct to do this.

    • @RalphBacon
      @RalphBacon  7 років тому +2

      I think you are limited to 32 bytes of data though... will have to check this.

  • @romanhuante
    @romanhuante 7 років тому

    Hi Ralph! Thank you for taking the time to make this video. It has been a tremendous help for me in learning how these little modules work. As an absolute beginner to this kind of technology though, i still get kind of lost when it comes transmitting data of different types and sizes. I'm looking to transmit an array comprised of 5 values from one arduino nano to another. Could you please explain a little more in depth as to what I would need to do to make that work and why? Thank you so much!

    • @RalphBacon
      @RalphBacon  7 років тому +1

      I'm pretty sure that you can transmit up to 32 bytes of data in one go (concatenated as a simple string). Hmm, maybe I should talk about this when I do my video on the Benny IN/OUT indicator (using my TFT screen but also a couple of nRF24L01s too). Thanks for the prompt, I'll include that info.

    • @romanhuante
      @romanhuante 7 років тому +1

      Thank you sir! I have it figured out now (:

    • @azysgaming8410
      @azysgaming8410 2 роки тому

      @@romanhuante pls tell me how. I wanna send multiple values too.

  • @RaadYacu
    @RaadYacu 7 років тому

    These are great nRFs easy to use but no SOC. newer ones have both. Just be aware that you can only transmit 32 bytes of data. Also receiver can go up to 5 or 6(not sure of the number of the top of my head ) kind of like Xbee
    But then it's more of mesh network I am talking about
    One more thing is possible to use Struct to send diff kinds of data as one block
    Great video Ralph

    • @RalphBacon
      @RalphBacon  7 років тому +1

      Hi Raad! The author of the RF24 library even has one for audio so I guess he gets round the 32-byte limit (perhaps he just transmits 32-byte chunks, I haven't looked!). He also has a library for that *mesh* network you mention. But frankly, I think most Arduinites will just want a fairly simple system and for that purpose these cheap (but very clever) units really do fit the bill, don't you think?
      Thanks for pointing out those caveats, it's this sort of information sharing that makes the Arduino collaboration so very powerful - and ensure we buy hardware with both eyes open!
      And I'm glad you liked the video, I'm hoping it was as simple as could be so beginner Arduinites could follow it!

    • @RaadYacu
      @RaadYacu 7 років тому +1

      I do agree - keep it simple is my motto for sure
      I run into trouble with these when I hooked them up to ESp8266. The power the ESp8266 was giving out was not enough to power the nRF, so I used the capacitors.
      Again, enjoyed the video. Keep them coming

  • @PatrickMulcahy
    @PatrickMulcahy 6 років тому

    excellent

    • @RalphBacon
      @RalphBacon  6 років тому

      Thanks for your post, Patrick Mulcahy, good to hear from you.

  • @JerryEricsson
    @JerryEricsson 4 роки тому

    Cool, several years ago, I purchased a lot of these, ten I think it was for not a lot of cash. Back then everyone said solder a capacitor on so I did that after they arrived, then put them in my storage bin, where they have lived, untouched by human hands ever since. You see, right after that, we were introduce to the ESP8266 which was much easier to play with and includes a micro-controller on board. So it is, when I need to communicate, I just do it over wifi, or if need be, go to the ESP32 and use Bluetooth which is so much easier now in its version 5 on my new Christmas/50th Anniversary gift from my wonderful wife. Since it was a combo, and since my old laptop has given up the ghost, I opened it early and am typing on it now. Man what a difference, I love the instant on with the solid state drive, the 4K display is so sharp I now see all the blemishes on the talking heads on FOX News, and as I say the Bluetooth works much better with very quick connect and very few dropped audio to my hearing aides.

    • @RalphBacon
      @RalphBacon  4 роки тому

      Oh dear. That is very bad news for me then, Jerry, With a 4K UHD screen you will see all the flaws and artifacts in my videos too! I don't think I will record in 4K just yet - not without a soft focus filter over my camera, anyway!!!

  • @demetriosdemetriou1114
    @demetriosdemetriou1114 7 років тому +1

    Thank you so much Ralph but I wouldn't do it with infra red . As you probably noticed it will be the receiver which will be implanted and to perform a task it needs to adjust frequency and amplitude of stimulation and this can be done with a transmitter and with a digital potentiometer and behave like an oscillator. Thank you as I have at least piqued your interest on my project. God bless you.

    • @RalphBacon
      @RalphBacon  7 років тому

      You did more than pique my interest, I have ordered one of the digital potentiometer chips but I will (probably) just use it as a simple volume control, controlled by infrared. At least it will demonstrate the possibilities. However, it will take several weeks to arrive from China so I must be patient!

    • @demetriosdemetriou1114
      @demetriosdemetriou1114 7 років тому

      Dear Ralph, I am happy for your interest and you are welcomed to join in, after all I am a lousy programmer(LOL) I know that I am waiting to hear from the Eurostars, but I hope and pray that will go through. I have intrigue the interest of worldwide Medical device manufacturers and all of them came to London for a conference but all of them wanted proof and FDA pass. Now we are near as I have partners for almost every discipline except a programmer and as it is very huge this project ($30 billion per year)it is better I end up having 5-10% than 100% and no partners. If I know your address I could sent you the digital potentiometer and from its data sheet I stole the program that I am using but please shhhhh don't anything to anyone about my infringement and can work as an oscillator. As always you can email me at demetrios@nevadatechnology.co.uk privately and may God bless you and family and the your cat.

  • @oncledan282
    @oncledan282 5 років тому

    Good day, Ralph.
    Simply the best ever tutorial on the nRF24L01+ I’ve tumble upon as of yet .. AND IT WORKED THE FIRST TIME !!
    Superb explanations and I WILL follow you since my objective is to make a Weather Station as mentioned in your video. I said to myself « This guy just read my mind !! .. Yes, YES !! Teach me how to send Strings variables over this module … ‘Master’ ! » Hahaha!
    My Weather Station is complete. I’m using DS3231 RTC for time reference and a BME280 for Temperature, Humidity and Pressure. Also using a CdS Cell to read illumination .. just for kicks and .. why not ? For the present time, I display this info on a minuscule SD1306 OLED Display on the exterior station. I plan on using a small 2,4 inch TFT display and graph the information for the last 48 hours on the interior part of it. I’m not there yet, since I still have to learn how to work the TFT.
    My main concern for now, is sending Strings to the other side. I’ll try to find the information on your other videos before seeking your help on that specific point. I hope to find it soon.
    Until then, I wish you a good day and keep on the good work.
    Best regards,
    Daniel Lachance .. aka « Uncle Dan ».

    • @RalphBacon
      @RalphBacon  5 років тому

      Glad you found it useful Daniel!
      Now, strings are an uncommon thing to pass around; much more useful is a flag or integer that means the same as a string. What are you doing with strings, Oncle? Remember you only have 32 bytes in a packet to transmit.

    • @oncledan282
      @oncledan282 5 років тому

      Good Day, Ralph. It was with great pleasure that I read your reply, and I thank you for doing so.
      Actually, I could get away with pushing long integers values through that Pipe. The actual informations I want to transfer is Year, Month, Day, Hour, Minute, Second. The rest of the informations are mainly of float type, since they have two decimal values. They are Temperature, Humidity, Atmospheric Pressure and Degree of Illumination. It would look like this (I added the comas to separate the values) :
      « 2019, 06, 19, 15, 24, 00, 25.34, 45.39, 1003.84, 19.35 »
      I kind of tweaked your Code a bit but with mixed results. I guess I need more tutoring on ways of passing data in the Pipe. Hahaha! Last night, while loosing sleep on the matter, I thought about shoving the info into an Array of [11] cells, and finding a way of passing it through the Pipe one [cell] at a time. This is still under work. Any help from your part would be well appreciated.
      Until next time we chat, I wish you a very good day and, like I said before, keep on the good. work !!

    • @RalphBacon
      @RalphBacon  5 років тому +1

      The way to do it is not with an array, but with a struct. A struct simply defines a group of otherwise unrelated variables both on the sending and receiving side. You have 32 bytes max available to send in a single packet with the nRF24L01 so you could reduce that by, for example, sending 19 instead of 2019 as the year (two bytes saved). If you need further help, find my email address in the About tab on my channel and I'll send you an example. Don't lose sleep on this!

    • @oncledan282
      @oncledan282 5 років тому

      Hi again ..
      Well, I thought sending the temporal data at first, the the environmental data as s second burst. This way, I can't bust that 32 bytes barrier .. But I just can't see how the « struct » works. (Yes, you can call me 'Green'). Hahaha !
      Thanks for the helping hand, Ralph. I greatly appreciate it. Have a nice day.

    • @RalphBacon
      @RalphBacon  5 років тому +1

      If you find my email address in the About tab I'll send you a quick example.

  • @pranavshinde9529
    @pranavshinde9529 4 роки тому

    First of all thank you so much, I've been struggling with nrf finally got it working. In my project I'll be controlling a bot with nrf, does the nrf needs to aligned in a certain position for effective tx and Rx.Also the range sometimes suffers even if I move one nrf little bit.

    • @RalphBacon
      @RalphBacon  4 роки тому

      The position of the nRF24L01 should not be critical. However, a couple of other things are:
      1. Are you using the adapter plate so you can run it off 5v? This is a very common source of problems.
      2. What power setting did you set in the code? LOW should be OK but try the higher power settings too. Only use MIN for workbench use (about 30cm range).

  • @pohlr1
    @pohlr1 Рік тому

    Just for people struggling on this something I did to fix everything was replace the library for RF24. I noticed I had a bunch of SPI.h files and the folder itself was like RF24-something so I deleted the folder and downloaded the zip from ralphs page and everything worked.

  • @JDI4DAVID
    @JDI4DAVID 6 років тому

    I found it easy enough to plug the black board power supply into a 6 way and a 2 way female pcb header. The nRF24 plugs up into the supply and overhangs the prototype pcb.

    • @RalphBacon
      @RalphBacon  6 років тому

      You're talking about *not* using the standard adapter plate, David? Can you just expand on what you're doing here as I didn't fully grasp how you're powering the nRF24L01, it would be useful not just to me but others reading your post too.

    • @JDI4DAVID
      @JDI4DAVID 6 років тому

      Ralph S Bacon I am sorry not to be clear. The power supply board I am referring to is the Black Socket Adapter Board www.amazon.co.uk/dp/B00NJCB7FS/ref=cm_sw_r_cp_apa_awLXzb5ACAMN0. This can be plugged into a couple of socket headers at the edge of a pcb. The radio board plugs up into the adapter board and overhangs the edge of the pcb. .

    • @RalphBacon
      @RalphBacon  6 років тому

      Ah, yes, all is clear now. Those adapter boards are the same ones I use, and yes, they can easily be plugged into a couple of socket headers on the main PCB, good idea. In fact, on that topic, I'm definitely in favour of having things 'unpluggable' for ease of maintenance or eventual replacement, it makes the whole process so much easier. Thanks for clarifying, David.

    • @JDI4DAVID
      @JDI4DAVID 6 років тому

      Ralph S Bacon I am very keen on pluggable modules after soldering a TFT display to a prototype board and then changing my mind. I find it is good to be able to swap out modules too to fault find. I have two sensor units sending data to my display and data logging hub. To keep it simple the hub has a NANO for the radio coms and another for the screen and SD card. I don't think the radio on SPI and the display on the same SPI bus will work without messing with the libraries. Would you agree?

    • @RalphBacon
      @RalphBacon  6 років тому

      If the libraries (and modules) follow the SPI standard then, yes, they should play nicely together (NB: nicely, adj, constantly fighting to see who is boss). No really, as long as the CS pin is kept high for the module not being used, and LOW for the one that is, then they should work together. That's the whole point of a shared bus, right? Back on Planet Earth, they may not work together at all. I've seen libraries that just put the SPI CS pin LOW and keep it there!!! But that could be corrected of course. If you have a Logic Analyser then it would be simple to see what each bit of code does to the SPI bus (and something on my wishlist). I guess you could try it, you may be pleasantly surprised. Or you may think, what the hell, another $2 Nano and I avoid all that potential pain!

  • @male22male22
    @male22male22 3 роки тому

    @Ralph Thanks for the video, I have a question.
    1. which pin in Arduino nano connect to the pin IRQ, and CE in NRF24.

    • @RalphBacon
      @RalphBacon  3 роки тому

      The Nano is _exactly_ the same as the UNO in this respect, same pins etc.

  • @DrekerboyStudio
    @DrekerboyStudio 6 років тому

    hi ralph i am working on a project but i am not the best at coding.
    so i have a question, can you maybe help me with controlling a arm or a robot wireless with the nrf24l01.
    but the controller i am using is a wii nunchuk controller.

    • @RalphBacon
      @RalphBacon  6 років тому

      I'm afraid I'm not familiar at all with Wii or their Nunchuk controller. The best place for general help is forum.arduino.cc who have experts aplenty that probably know this stuff inside out. Good luck!

    • @DrekerboyStudio
      @DrekerboyStudio 6 років тому

      ok thx,
      but can you maybe help me with controlling a robot arm with potentiometers wireless?
      thanks

    • @RalphBacon
      @RalphBacon  6 років тому

      Controlling it with your phone, you mean? Wirelessly? Well, you could watch videos #36 and #37 which show you how to send stuff (and receive confirmation) from your phone to your Arduino. Once you have mastered that, it's the same as entering a value directly into the Arduino. Not difficult but you must walk before you can run!

    • @SpeccyMan
      @SpeccyMan 6 років тому

      DrekerboyStudio, take a look at this video as it might help point you in the right direction:
      ua-cam.com/video/7rcVeFFHcFM/v-deo.html
      his example is controlling a single servo with a potentiometer (actually a joystick with 2 but only 1 is used) and NRF24 modules.

  • @davidbond9360
    @davidbond9360 6 років тому

    Hello Ralph, great video, it lead me to success! I've built a remote sensor using the nRFL2401+, is there anyway I can get the nRFL2401+ to tell me when its battery is running low?

    • @RalphBacon
      @RalphBacon  6 років тому +2

      You can get the Arduino to tell you this by monitoring the battery level on an analog pin, David. I'd use a simple 1K and 10K ohm potential divider for this. Two resistors, the 1K from +ve and the 10K to -ve with the analog pin connected to where the two resistors join. The Arduino can then transmit a data packet that you interpret and that tells you the battery is low. Experiment on a local Arduino so you get the correct measurement. Any good?

  • @johnfiott
    @johnfiott 5 років тому

    First of all, thank you for an excellent video. Your explanation was clear and easy to follow and I feel like I have now moved up a notch in the potential uses of my Arduino. I would just like to ask where I can access the data sheet (library commands to set power level etc) for the module please. Thanks again.

    • @RalphBacon
      @RalphBacon  5 років тому +1

      Good you liked this, John, and there's now a detailed specsheet for the chip in my GitHub. However, the best way to find out the available commands is to look inside the RF24 library header to see what functions have been defined. For example...
      For example, the command radio.setPALevel(RF24_PA_MIN) shows that the function setPALevel accepts a defined constant for power level; find that function in the header (or .cpp file) and see what the alternatives are.
      A bit of digging may bring up nuggets of gold!

    • @johnfiott
      @johnfiott 5 років тому +1

      @@RalphBacon Thank you so much Ralph. You are my idea of what a tutor should be all about. Show how something is done, then point the student to other resources, because that is how one learns. If you ever decide to release courses on Udemy or similar platforms (and you really should consider this) please let me know and I will definitely consider subscribing. Cheers from Malta. :-)

  • @whitefields5595
    @whitefields5595 6 років тому

    I have been using these a lot over the last few days running on 2 Arduino Pro-Minis (8Mhz 3.3V) both on batteries via 3.3V regulator. The Tx code tends to hang up. The Rx code seems OK. I put a 10uF electrolytic across the 3.3V input on both Tx and Rx chips and all is well with the world. There may be a synchronisation issue with the WiFi chip during the Tx pulse.

    • @RalphBacon
      @RalphBacon  6 років тому

      Most issues seem to centre around the 3.3v power to the modules, especially if users are powering them directly from the (cloned) Arduino board's 3.3v pin which can severely limit the amount (and quality) of power available. The solution that always seems to work is the use of adapter boards so you can power them from 5v and let the on-board regulator take control. You've sort of done a similar thing but I'd still lean towards a proper adapter board which is designed to give enough current even for full power transmissions (and you can then connect the cable from the top too). But this is undoubtedly very useful information, Whitefields, given the large number of queries on this topic so thanks for posting. PS there is a post under this video that details the cloned chips' centre frequency is *not* what it should be - another source of potential problems, maybe?

    • @whitefields5595
      @whitefields5595 6 років тому +1

      Ralph, I was not clear enough above. I want a low weight, compact portable WiFi so I am running on one single 18650 Li-ion cell to power each my Arduino pro-mini and associated nRF. The power supply to the nRF is via a low drop out (80mV) 3.3 V regulator www.ti.com/lit/ds/symlink/lp2951-n.pdf. I have the 10uF capacitor near to the nRF board. All works well, but I will be lowering the voltage down to 3.0 as the data sheet of the (original!) nRF gives a range of 1.9 > 3.6V. The Pro-Mini has its own on-board regulator so the battery goes straight to this, at least for now. I started off using the adapter boards (see post below) but eventually Arduinites are going to need a specific power supply for their projects so I use these regulators which are made for the 3 common TTL voltage levels. So far reliability is perfect, but I'll let you know how things go at 3.0V which I need to get the most out of the battery. fyi a video or 2 on low voltage / wearable projects would be useful. Thanks again.

  • @browaruspierogus2182
    @browaruspierogus2182 6 років тому

    Thank god they made multiple instance IDE.This code reminds me inter service communication with pipes.
    Very clean. I'll test it. Ugh I just looked at the code - it is bad... Just don't call stop listening at the beginning if it is a transmitter role. Ideally both mcus should have two roles - each one pinned to interrupt

    • @RalphBacon
      @RalphBacon  6 років тому

      Well, you know, Browarus, the demo sketch is just that, a demo, and if I were using this for real the code would look quite different, I'm sure. But it's just enough to get people going (I hope) so don't be too stern with me :) But thanks for posting, and I hope you enjoyed the video (and demo code) anyway!

  • @jameshaefner8880
    @jameshaefner8880 7 років тому

    thanks for the video, planning a project using these and it was very helpful! quick question however, where would you adjust the code to have 2 main transmitters and one main receiver? I am thinking of having two separate sensors with arduino nanos transmit different data back to a main arduino mega to process and display the data. Thanks

    • @RalphBacon
      @RalphBacon  7 років тому

      Hey James, glad you found the video useful!
      As soon as you have multiple transceivers you run into the challenge of logistics; who is sending to whom, when, how often and so on.
      I would assign your sensor transceivers different channels so that your master controller can then poll for the results every few seconds, minutes or whatever. In fact, the transceivers have 124 channels to choose from (Wi-Fi and microwave interference notwithstanding) and can be used to "channel hop" anyway.
      So your sensors wait for a "Give me your data request" (in much the same way as my demo showed) and transmit the values back to the master. The master then moves onto the next sensor and repeats the request albeit on a different channel (probably in a simple loop).
      There are doubtless other ways to do this with a sensor mesh perhaps (there are examples in the library which I must admit to not having read, my requirements being fairly simple), but I've no reason to think my above suggestion would not work with several sensors, all on different channels.
      I hope this helps and good luck - please post back your success, failure, issues, problems so I (and other readers here) can see what works and what doesn't. Great question!

    • @jameshaefner8880
      @jameshaefner8880 7 років тому +1

      Thanks for the reply! I have been looking through different videos on simple communication, mesh, and networks to see what will work well for what I am trying to do, and what will also allow for easy expansion after the initial installation (adding additional sensor nodes). I am thinking of moving towards a simple network, but am still doing research and planning for this. Your video was a lot of help in getting started with everything

  • @howardtriggs5967
    @howardtriggs5967 7 місяців тому

    Thanks for the excellent tutorial, I was very quickly able to get the setup to work with the nRF24L01 modules with the built in aerial, However when I went to swap them out for the PA/LNA modules with the aerials it didn't work - is there any modification I need to get those longer range modules to work? Thanks again

    • @RalphBacon
      @RalphBacon  7 місяців тому

      Glad you got it working but odd about the longer range modules. Mine just used the "standard" IPX connector (as found on some ESP32 modules) and I used the same aerials that I would for an ESP32.
      The IPX connectors are a bit stubborn so make sure they are connected properly. Unless you have the screw-on type which accept the ESP32-style aerials too, directly.
      Try getting the BT module(s) working with a simple two-way Arduino sketch to prove the modules are behaving in the manner you expect.

  • @adabill295
    @adabill295 7 років тому

    Great project, I have a need for a Garage Door monitor. I have two doors and sometimes ( Not very often, but once is too many) I forget to close the door after I came in. It would be nice to be able to have a display inside showing the position of the doors. It is an attached garage so the doors are about 30 feet away from living area ( through a wall). I would also appreciate an idea ass to how to tell if the garage is not fully closed. What type of sensor to use?
    I have really appreciated your videos and they come across ( at least to me) in a very understandable manner and you explain everything important like where the specific library you use is located.

    • @RalphBacon
      @RalphBacon  7 років тому

      Hi AdaBill, I'm glad to like the videos! As a (wireless) garage door monitor this would be ideal. You can also use a Hall Effect transistor that responds to a magnet to determine whether the doors are *fully* closed (not left ajar). I've done a video on those too. Even a microswitch would be OK (like I used in my stepper motor project). Anything that could connect to an Arduino that then sends out the correct status via the nRF24L01. Sounds like a nice project. Let us all know when you get it working, right? Thanks for posting!

    • @adabill295
      @adabill295 7 років тому +1

      Thanks again, I went back and looked at video #55 and I'm in the process of ordering some hall effect sensors to try it out.

  • @gaya6352
    @gaya6352 3 роки тому

    Hi Ralph!
    first of all thank you for sharing this video with us.
    I would like to ask you a question; is it possible to receive data on the spatial position?

    • @RalphBacon
      @RalphBacon  3 роки тому +1

      Do you mean where the other system is positioned, like a GPS signal? If so, then no, although you could install a simple GPS module and send the coordinates back to the initiator, I guess.

  • @mendimano
    @mendimano 7 років тому

    Nice tutorial thanks for sharing, I wonder is it possible to send and recive the internet signal or for example the cable TV signal through this system.

    • @RalphBacon
      @RalphBacon  7 років тому +1

      Not a chance, Armend, sorry! This is not a computer network packet transporter, nor a TV signal repeater either (far too slow). But it is good at transmitting (small packets of) data from one Arduino to another, at moderately high speed (up to 2Mbps) but that's about it. If you think about computer networks, they have a minimum speed these days of 100Mbs and usually 1Gb or higher. Internet TV requires something like 3Mb per second for standard definition and 5Mbps for HD. So...
      So forget that idea but do use this wonderful device for your Arduino needs,it really does work well (with the adapter boards); especially nice is the auto-confirm and auto-retransmission feature, all without a single line of code! I'll be using this in a future project (after my imminent vacation). *Good question*, though, thanks for posting it here.

  • @gsuresh2u
    @gsuresh2u 2 роки тому

    Good explanation is there any library available for Black Pill ? I mean STM34F401CC or STM32F411CE ?

    • @RalphBacon
      @RalphBacon  2 роки тому

      It looks like the standard libraries for the STM32 should work - but I'm guessing. This video is a good intro though:
      ua-cam.com/video/b1123kz_3MM/v-deo.html

  • @danhcong5234
    @danhcong5234 4 роки тому

    Thanks for sharing. I have got a question. Co D10 pin work in pwm mode with this rf module? Thanks.

    • @RalphBacon
      @RalphBacon  4 роки тому +1

      As we are not using pin D10 for the nRF24L01+ I don't see why you could not use for anything you wanted to, including PWM, Danh.

    • @danhcong5234
      @danhcong5234 4 роки тому

      Ralph S Bacon thanks. I tried this module. One with antenna and one without. I tried indoor, but distance is not far as advertised. Just approximately 6 meters. Do you have any information about this?

  • @baswansink7068
    @baswansink7068 6 років тому

    Dear Ralph, i have setup a similar setup as your video here, the thing i have is that i'm seeing the "No aknowledgement" message, but on the receiver side it still states "Sent response .." and counting up. what could be the cause of this? I expected that if the transmitting side does not work well, the receiver side doesn't do anything right? At least if i disconnect the transmitter from USB the receiver stops sending out responses, so something reaches the receiver. Any thoughts, many thanks ahead.

    • @RalphBacon
      @RalphBacon  6 років тому

      Well now, Bas, you are sure the receiver is getting the correct value (from the transmitter) but the transmitter is not getting the auto-acknowledgement? I'm firstly assuming you haven't programmed the nRF24L01 to disable that feature as that would be too silly for words. In which case, are you running the nRF24L01's on their adapter boards? If you don't have adapter boards do yourself a huge favour and get some, they are very cheap and solve 99.9999% of all problems with these devices. If you do have the adapter boards already, let me know and I'll think of what else we can do.

  • @AndyMcGeever
    @AndyMcGeever 3 роки тому

    Oh my ears are happy. There are some great tutors on youtube and i can't take that away from them but whiny American accents drive me insane. Even the accent of a southerner is music to my Leeds ears ;-) Great tutorial, Subscribed.

    • @RalphBacon
      @RalphBacon  3 роки тому

      Wow, thank you! Nice to have you along, Andy. 208 videos and counting. If you look at the PDF file link in all my video descriptions you can search for topics or keywords - I use it all the time!

    • @AndyMcGeever
      @AndyMcGeever 3 роки тому

      @@RalphBacon No worries. Hope you're having a great Christmas. While i'm here, could you tell me if it's possible to somehow create a network bridge with an NodeMCU V3? I've built a central heating controller which communicates with a number of ESP8266-01 modules sending temp data. I am fairly new to this stuff but finally managed to get them communicating using a NodeMCU as a soft AP webserver. The clients connect, send temp data and then sleep. Is it possible to also have the access point connected to my local LAN? I'm using the remote XY android app to show temp readings and change setpoint which is currently running on a single NodeMCU with DHT11 and control relay directly attached and connected to my WiFi as a client. My aim here is to have the temp sensor in a different location to the relay. A point in the right direction would be massively appreciated. I also have a couple of ESP32's but haven't really looked at them yet.

  • @MrArslanAhmad97
    @MrArslanAhmad97 7 років тому

    Thank you so much Ralph for putting up this tutorial video. I finally got my setup up & working..!!
    Just one question, how can we send and receive multiple analog data from Tx to Rx? Can you please share me a small example of variable declaration & way to use in the code.
    Much appreciated !

    • @RalphBacon
      @RalphBacon  7 років тому

      Congrats on getting this working, Arslan. I reckon you can code the next bit without an example, because it is very easy: you are limited to something like 30 characters but just concatenate the data you want into a string (instead of a single character like I am doing) and it should 'just work'. Let me know if it doesn't for you.

  • @artbecker5618
    @artbecker5618 7 років тому +1

    You can get adapter plates for $.50 or less, postpaid, on AliExpress.com -- Bangood looks to be almost always way overpriced. You can also get the same two boards with SMA connector and antenna at AliExpress for $1 less than you paid. Or you can go on Ebay and pay 5x to 10x the same price as buying direct from China. The only advantage I've found to using Bangood is occasionally/rarely they have something that AliExpress doesn't offer. Thanks for all your great videos.

    • @RalphBacon
      @RalphBacon  7 років тому +1

      Do you know what Art? I too have found Banggood to be quite expensive lately. I put it down to the value of the British Pound dropping but even looking at the $ prices makes me think you are absolutely spot on. And AliExpress is like a mini-eBay in itself, the service is good and the prices competitive. I've bought some stuff from AliExpress but Banggood (and Gearbest) were always convenient but now... well, your experiences seem to coincide with mine. Interesting that you point this out, not just for me but others too who read this, why pay more when you don't have to? Thanks, too, for the encouragement, it's great that my Arduinite viewers like my videos. Great post, appreciated.

    • @johnfiott
      @johnfiott 5 років тому

      @@RalphBacon Unfortunately Ali Express does not accept Paypal, unlike Banggood. And somehow I always feel better when using Paypal rather than sending out my credit card details.

  • @Vhbaske
    @Vhbaske 3 роки тому +1

    I've had some bad luck with the Dupont cables, many fail and some come without continuity from the pack. I am ordering a set that one can make them and includes a special plier. Too many obstacles here, but I am persistent to overcome obstacles.

    • @RalphBacon
      @RalphBacon  3 роки тому +1

      I've got the metal pins and sockets and the shrouds (plastic headers) and the correct pliers (not cheap). Whilst I can now make some wonderful cables, Pedro, it is a fairly slow process! But sometimes you need a quality cable. Dupont is only OK for breadboard use, not a permanent project.

  • @drelmetbrown
    @drelmetbrown 4 роки тому

    Thanks for the video Ralph, very informative and helpful for a newcomer to the subject. I am awaiting arrival of 2 Rf nano's - so no separate tx / rx modules. Have you come across these yet ?

    • @RalphBacon
      @RalphBacon  4 роки тому +1

      Do you mean the new Arduino Nano 33 IoT? I've not got any experience with that (yet). A bit pricey for my shallow pockets! It uses via WiFi not the (same frequency) 2.4GHz _bespoke_ comms of the nRF24L01 though. It will be interesting how those communicate; I'd expect that you would have to know the other's IP address.

    • @drelmetbrown
      @drelmetbrown 4 роки тому

      @@RalphBacon. Sorry no Ralph i was referring to this... www.aliexpress.com/item/32980796969.html?spm=a2g0s.9042311.0.0.785e4c4doapbjE
      I am a little limited on space so thought this was helpful being integrated all in one. Oh, Nano 33 IoT just had a look at that and may have to play with that one in the future !

  • @EngrShaukatAliKhanIslampur
    @EngrShaukatAliKhanIslampur 6 років тому

    This is Clear and the best explanation.
    Is it possible to do "Master-less serial or parallel communication between multiple arduinos through Nrf24L01?
    I'm working on a project that will have more than 10 arduinos.
    I'm looking for a way to have any of the arduinos broadcast a stream of data to any of the other arduinos at any time. when two or more arduinos are in range, they must automatically connect and start communication. it should be two way communication.

    • @RalphBacon
      @RalphBacon  6 років тому

      You probably need a *mesh network* (and Google can be your best friend here). There is an example, I believe, in the library used in this demo. I didn't go down that route as it's more advanced but may be what you need. I hope this helps.

  • @michael__5647
    @michael__5647 Рік тому +1

    hey, one thing i discovered while working with the nrf24l01 pa lna is that my jumpers where to long, they were about 10cm an that was to much, i soldered everything to a perfboard and now it's working but i got me a lot of grey hairs till i figured this out, winding gnd around mosi and miso should work too

    • @RalphBacon
      @RalphBacon  Рік тому +2

      Interesting, thanks for the heads up!

  • @thormarum995
    @thormarum995 7 років тому +1

    Just found your channel and I have a question. I bought 433 MHz modules but they interfere with my weather station and they are very sensitive to noise. I need to transmit a RS-232 signal (5 bytes) from a PC to an Atmel microcontroller. Is this possible using these modules?

    • @RalphBacon
      @RalphBacon  7 років тому

      Hi Thor! Yes, I've found the 433Mhz modules are pretty dumb inasmuch that they interfere with one another as well. You can certainly transmit data from your PC to an Arduino but I have only done this using two Arduinos (one transmitter, one receiver) and using Python on the PC to send data via the standard USB to the transmitter Arduino (all simple stuff). No RS-232. Do you need that or is it just a communications protocol you thought might be required? This is reasonably straightforward, so much so others might benefit with a video on how to do it... let me know exactly your requirements.

    • @thormarum995
      @thormarum995 7 років тому

      Hi Ralph. Thanks for your answer. I'm a modelrailway enthusiast and would like to have small scale 1:87 trucks driving, just like they have at Miniatur Wunderland in Hamburg. If you don't know this please check out their website. You can also find lots of videoes on YT. I control my trains from a PC using homemade MS VB software. Partly using industrial I/O and partly RS-232 communication. My experience is that USB and VB 6.0 is unreliable. In Hamburg they use IR to control their vehicles but I can't get the range I need and therefore thought of radio communication. My plan is to put a receiver in each vehicle and send commands to each vehicle. Each vehicle will have an AtMega 88 to control it's functions as well as receiving data. Each vehicle will have it's own unique address, hence 5 bytes. 1 address byte, 3 bytes data and 1 byte checksum. I'm an electronics engineer so I can make my own hardware, I can develop SW for Atmel and program chips using the Atmel STK-500. I haven't tried using STK-500 with Arduino but it should be possible. Hope this gave you an idea of my project.

    • @RalphBacon
      @RalphBacon  7 років тому

      I don't know about USB and VB6.0 being unreliable as I stopped using VB6 about 10 years ago and now it's just a dim and distant memory!
      If you used a more recent programming language (Python seems to be the "in-thing" right now) you would have no problems using USB. Python (to me) is a strange mixture of C-like syntax with Visual Basic included (from someone who has never programmed in Python). But you could use the Python "Processing" IDE that is *very* similar to the Arduino IDE (see processing.org/reference/environment/) which I also demonstrate briefly in my video #76 which reads in some Arduino-generated data.
      Just some thoughts. Once you have cracked the reliability of USB to Arduino then this project is very do-able. Thanks for letting me know the background, a very interesting project you have there.

  • @paulhurd954
    @paulhurd954 6 років тому

    Thank you, made things easy to set up.
    Question about the nrf24lo1 with the extended antenna. Does that just increase its range or does it make receiving/transmitting better. Less prone to interference?

    • @RalphBacon
      @RalphBacon  6 років тому

      Both, I think you'll find to be true, Paul. A better antenna lets more power to be transmitted, and a bigger signal to be received. So it's a win-win on all fronts if you choose one of the walkie-talkie style antennas for these modules. Make sure you use the adaptor plates for these units if you using anything above minimum power though (in fact, at all times)! Good question, thanks for posting.

    • @paulhurd954
      @paulhurd954 6 років тому

      Ralph S Bacon thanks for the response. Makes sense. Could I then use a module with Antenna to do the transmitting(more power) to a module with built in antenna to only receiver data? Or do they need to be identical modules?

    • @RalphBacon
      @RalphBacon  6 років тому +1

      No, they don't need to be identical but (part of) the benefit of a higher power transmission would be lost, because of the less efficient receiver's aerial. However, either/or is better than no high power aerial, that's for sure - a higher power transmitter will transmit further and a more sensitive receiver will be able to grab a signal from the noise. Do bear in mind that although I've called the sketches "transmitter" and "receiver", they *both* transmit, even if only to auto-acknowledge. And do make sure you use the adapters (I've said it before and I'll say it again!).

    • @paulhurd954
      @paulhurd954 6 років тому +1

      Ralph S Bacon thanks!!!

  • @muhammadakoodi
    @muhammadakoodi 3 роки тому

    Hi
    Do you know what version of the library you had at the time, it seems to have updated and the code doesn't work anymore.

    • @RalphBacon
      @RalphBacon  3 роки тому

      It should be in my GitHub for this video: github.com/RalphBacon/nRF24L01-transceiver

  • @uktoker71
    @uktoker71 6 років тому

    Very nice explanation. I did something very similar with the example code in the library, but also added 3 LED's on each setup to help range testing. Green LED to show which Arduino is the Transmitter and blinks when data failed. Yellow LED illuminated when receiving data, Red LED illuminates when sending data.
    One thing i am confused about is when you say "sending one byte" @20:18 but actually sending up to 3 chars.

    • @RalphBacon
      @RalphBacon  6 років тому

      Great idea to add LEDs to show the state, uktoker71. I watched the video at 20:18 where I was talking about line 51 and writing a single byte of data - so I'm not clear on where the 3 chars comes in, please do point me in the right direction. In these demo sketches I definitely only send a single character (in both directions) just to prove the point, as it were. Let me know where I've added confusion!

    • @uktoker71
      @uktoker71 6 років тому

      Thanks for the reply.
      When you send for example a value of 230 to the other Arduino, I don't understand, I thought that would be 3 characters. I am new to all this Arduino stuff so still trying get my head around all the code, but slowly learning by watching Videos on UA-cam and looking at the examples that come with libraries and the IDE.
      --edit--
      i think i just got it... 1 byte of data can be anywhere between 0 and 255, so a value of 256 to 65535 would require 2 bytes.

    • @RalphBacon
      @RalphBacon  6 років тому

      You got it right in your last sentence! Yes, a byte of data contains 8 bits. Each bit represents (to us humans as well as the computer) a particular value. The "Most Significant Bit" (highest value) is on the LEFT; the "Least Significant Bit" is on the RIGHT.
      So the rightmost bit represents 1s, the next from right represents 2s, the next one represents 4s and so on. So to represent the value 5 in binary you have 0000 0101 (that's one four and one single 1, which when added together equals 5).
      To learn you have much, my young Padawan and patient you must be (to misquote Yoda). I have many videos that will help you, I suggest starting at video #8 which might help, but there are many here. Somewhere I show a really easy way of converting any number to binary, a child could do it. Don't know which video but that should encourage you to watch several!

  • @neilw2O
    @neilw2O 5 років тому

    Thanks Ralph. Like you say, had to jump through hoops to get two USB ports working at the same time. Windows 7
    End up swapping the mouse with other USB port forcing driver reload. Then it worked.
    Is it safe to close the Arduino windows? Unplug USBs last is my guess. We will see. Plug 'em in first? I will try tomorrow..

    • @RalphBacon
      @RalphBacon  5 років тому

      Yes it can be very tricky. Saw your later reply so I guess you have it cracked now!

  • @vivekvenkatsubramaniam437
    @vivekvenkatsubramaniam437 7 років тому

    Hey, Mr Bacon! I found this very useful. I do have a question, though. In my computer, there's just two ports, while yours seems to have more. Can I "add" multiple COM ports, or is it unchangeable?

    • @RalphBacon
      @RalphBacon  7 років тому +1

      Hey, Vivek! Com ports are not added (not by you anyway).
      When Windows is notified by the USB bus that a device has been attached it will allocate it a COM port number, not randomly but in a more-or-less sequential way. As you disconnect devices those ports "disappear". The same port number is (usually) allocated to the same physical USB socket you plug stuff into. So if you plug your Arduino into the leftmost USB socket of your hub, and is allocated to COM 5 then it will almost always be allocated that COM port number if it is plugged into that socket again (unless already in use). That's why it is good to always plug USB devices into the same socket otherwise it will re-enumerate and re-install any drivers (for that COM port).
      If you go to the Device Manager, View, Show hidden devices you'll see the COM ports that were previously assigned to stuff you previously plugged in.
      All clear as mud?

    • @vivekvenkatsubramaniam437
      @vivekvenkatsubramaniam437 7 років тому

      Ralph S Bacon So basically, the more new devices I plug into my device's USB port, the greater the number of COM ports that appear in it. Am I getting this correctly?

    • @RalphBacon
      @RalphBacon  7 років тому

      That's exactly how it works, Vivek.

  • @demetriosdemetriou1114
    @demetriosdemetriou1114 7 років тому

    I definitely did not fry it(LOL) at the input of the transceiver I have added 10 micro-Farad..It is very good programmed you have sketched My recent trial it was to keep what you have programmed randomSeed(analogRead(A0)); //ADDED** and in the void loop i have used
    unsigned char data =random(A0); I don't know if it is the right expression though.
    on the receiver void loop unsigned char data; uploaded the #include and wrote the function to make the pulses
    for (int i=0; i

    • @RalphBacon
      @RalphBacon  7 років тому

      The digital potentiometer (INTERSIL X9C103PZ series) is not something I am familiar with but as you have the library (presumably from tfager from the Arduino forum) you should follow the examples (if any) there or ask in the forum for further help as this is outside of my experience .
      However, all is not lost as you have piqued my interest and perhaps one day I will do a video on how to implement such a device (but I would do it using an infrared transmitter not an nRF24L01 unless you specifically need to send data back of course!). Good luck with this.