nRF24L01 serial like synchronous bi-directional communication

robvoi:
I started working on my own solution. Not all the features I requested in my initial post are in. But for my project it does the job. I'll extend it as needed by the project.
It is based on the getting started sketch.

What you can do with it:

  • One sketch for both arduinos/nodes.

  • Submitted messages get "injected" into the variable used for buffering the serial communication. So your sketch works with serial input the same way as with messages received via the NRF.

  • Submit T:xxx\n via serial to one arduino will submit a message (xxx) to the other one. (can trigger any function which can also be triggered by serial com)

  • Submit S:xxx\n via serial to one arduino will submit a message (xxx) to the other one and have him output the message via Serial.print.

  • Submit R\n via serial to one arduinowill perform a throughput test.

  • Submit T:R\n via serial to one arduino will request the other arduino to perform a throughput test.

  • Submit T:P\n via serial to one arduino will request the other arduino to perform send back "Pong".

Every input on improvements is welcome. If someone finds ways to reduce the size of the compiled sketch I would be glad too.

This is good stuff man... just what I'm looking for... :slight_smile: :slight_smile:

I got the RF24 lib working fine with the GettingStarted examples and got very good range of out my wireless modules from inhaos.com ( they are 100% compatible with nRF24L01 modules )...

When I copy, compile & upload yr sketch on both my Arduino UNO with the correct SPI pins, nothing happened on the Serial Monitor... even the radio.printDetails() did not print out on the Serial monitor...

Any idea where should I start troubleshooting this ?

I've read the nRF24L01 datasheets and tested a few other Nordic RF24L01 libraries and found this RF24 libraries from maniacbug ( http://maniacbug.github.com/RF24/index.html ) one of the best lib for these low cost RF modules...