Go Down

Topic: Arduino + nRF24L01 (Read 12 times) previous topic - next topic



I have two of these cards nRF24L01, each connected to an Arduino Duelminove ..

I need help in programming boards, I wanted to work as a receiver and transmitter..
I've been seeing here, but did not realize there much .. http://www.arduino.cc/playground/InterfacingWithHardware/Nrf24L01

Now already show a photo of the robot..  http://img191.imageshack.us/f/dscf1277hg.jpg/



- the site http://blog.diyembedded.com/ has a general description and quite a few tutorials on how to use the chip. See links on the right side to various pdf's.

Also, the mirf-lib comes with a few simple examples which should you get going. They are pretty extensively commented. Download and unpack the lib. Note that you need also the special SPI-lib from the same location. The Mirf-lib does not work with the SPI-lib which comes with Arduino 22.

Important in the usage of nRF24L01 is that (in Mirf-lib language) the RADDR and TADDR strings are matching, that the payload size is identical on both sides, and also that the channel the units are operating is identical. Speaking of channels: you might want to use another than the default channel, as this one is close to the WLAN channel 1 which is usually jammed with traffic.

Note that you will not get more than a few meters of transmission distance with these units - they are primarily used in wireless presenters, mouses and keyboards.... - no way to control a robot 100 Meters away with that technology.


I've been researching and these must be the right code for programming.?

Uploaded with ImageShack.us


Flavio - that is just part of the story, namely only the listing of the different code groups available. That will get you nowhere. You need to look

  • at the different registers, in order to understand what needs to be set for your specific application

  • at the state diagram of that module (actually quite complicated) in order to do it in the right sequence

  • and finally at the specific commands to read and write registers and to lower or raise signal lines.

or, in other words: get the datasheet of the nRF24L01 and read a lot. Expect to have to do a lot of experiments before you reach your goal, as usually datasheets are not written very well. It's a lot of work. That's why usually people use libraries written by others which simply "do the job". Have a look at the Mirf-library (http://www.arduino.cc/playground/InterfacingWithHardware/Nrf24L01), it probably does everything you want to do. Note that you have to install the special SPI-lib which is linked on that page.

If you really want to start from scratch, have a look at the code I published here (http://arduino.cc/forum/index.php/topic,54795.msg392325.html#msg392325) - it's only covering a part of the transmitting operation of the chip, but it should get you going on the low level stuff. Also look at the tinker.eu-stuff linked on the Mirf-Lib page; mbed has probably also some library which can give you ideas on how to operate this specific chip.

However, I recommend using simply one of the libraries which are proven to be working...


I basically wanted a card to send the signal to two potentiometer ..
Can not you give an example.?

Go Up