I have tried a few article sketches for the NRF24 device, and tried using Arduino Nano. But so far nothing has worked or simple enough for me to try and understand how to adapt for what I want.
Basically want 4 pushbuttons (Transmitter) and 4 LEDS (Receiver) that momentarily light up when holding down buttons. Can anybody please suggest a link to an example that does work and could be modified the way I want it. Many thanks
Your question is too vague to merit serious consideration. You have some code that does something. You did not post the code, explain what it does, or explain what the problems with the code are.
I hope this Simple nRF24L01+ Tutorial will be more useful for a beginner as it draws everything together that is needed to get started. I have also tried to make the examples simpler.
Many thanks mrburnette, Robin2, just what I wanted. All my previous searches led to articles that threw up errors, which were then highlighted in reviews from others later in the articles.
Your links look ideal for what I was looking for, thanks again
FYI.... how did I find it and you did not? Well, Google is an interesting search engine and it helps to put queries to Google in a "context" setting ... in this case, I simply added the single word "error" as a pre-fix to the done = .... statement.
Thanks again. I am using the RF24-master version, but still a problem. I think I will have a last look round for code that works for 2 nano boards without errors to sort out. I simply just want the TX to have a pushbutton that when held down lights an LED on the receiver. Something I can then add further buttons and further LED's to. Just a simple one way transmission. I don't want to go backwards from Arduino to a Picaxe solution.
For the examples that have been suggested in this thread, you have to ensure you are using this RF24 library:
Otherwise you may get the classic "radio.read()" error.
The Nano, incidentally, has a poor 3.3 volt output ( about 50mA for some clones and derived from the USB chip) which may cause some problems with the RF24. You can get an adapter to allow the RF24 to use a 5 volt supply to get around this problem.
If you get a compilation error, post the full code here and error message, stating where you obtained the RF24 library and you should get a suggestion .
Thanks outsider, I will try your sketches later, although Robin2 suggests not using maniacbug/RF24 library (maybe just in Robins sketches?)
I am moving forward after using 6v6gt library suggestion, although I did still get the done = radio.read(msg,1) error. I found if I removed the word "done" the error went away, you can see this in my receiver sketch.
I have the following problems with where I am.
Looking at the receiver serial monitor, the value of 111 is continually received, and if I press the pushbutton it alternates between 111 and 222. I want it to send nothing if buttons not pressed.
Only want transmissions made if a button gets pressed, the current loop is active all the time.
I am basically trying to do a 4 button remote to pan and tilt a camera, so most of the time the camera is left static.
This example (RF24) highlights one of the things about open source software which I am sad to say drives me up the wall.
Generally there is no hierarchical control and a lot of well meaning people producing often good code with sometimes good documentation maybe according to some design rules all tripping over each other.
In the specific case of RF24, there was already an established library with a clear interface and a massive amount of code already written. That was Maniac Bug. It was not, however without its flaws.
Then a new library emerged, (THRH20) which usurped the original name but changed the behaviour of some of the methods, rendering much of the old applications and examples invalid. There is no doubt that at a technical level, the new library is a big improvement on the old, but the keeping the same name while changing the interface was a very bad move in my opinion.
The situation appears even worse with DS1307 / DS3231 clock chips with a proliferation of different libraries, some of which exhibit bizarre behaviour or are littered with all sorts of useless features which cause endless problems for the unwary.
The solution I see is some sort of central library catalog (why not on this site?) where a sort of reputation type scoring system could help potential users "separate the wheat from the chaff"
Having said all that, I'm thankful for the huge amount of effort that has gone into the massive body of software that is available for the Arduino and that it is all free is amazing.