Saturday, April 6, 2013

Finally got all RPi & UNO combinations working for nRF24L01

I have finally setup my second Raspberry Pi with 512M memory, clone the github RF24 ( https://github.com/stanleyseow/RF24 ) and can finally test all the combinations :-

rpi-hub.cpp


sendto_hub.cpp
Possible combo :-

- Raspberry Pi as hub
- Arduino as node

- Raspberry Pi as hub
- Raspberry Pi as node

- Arduino as hub
- Arduino as node

- Aduino as hub
- Raspberry Pi as node




If anyone got the above codes tested on other platform like  Arduino Mega2560, Due or other platforms, please let me know the details and links so that I can update my summary links for others..

My latest github repo have combined forked from https://github.com/gcopeland/RF24/ and I've added some of the changes into the Raspberry Pi codes.

Do read an articl from Greg on RF24 performance enchantments at http://maniacalbits.blogspot.com/2013/04/rf24-avoiding-rx-pipe-0-for-enhanced.html



As usual, I've all summary links below :-

- Raspberry Pi as hub ( rpi-hub.cpp )
- Raspberry Pi as node ( sendto_hub.cpp )

- Arduino as hub nRF24_Arduino_as_hub
- Arduino as node nRF24_sendto_hub





11 comments:

  1. Hi, it seems that the merging with gcopeland repository generated some conflicts ... ignored ;)
    (e.g. in RF24.h or RF24.cpp) ...am i doing something wrong ???
    Anyway, really good job (code AND blog !!!)
    Thanks

    ReplyDelete
  2. What conflict, can you post it to github ?

    I combined everything for the Arduino but only took the performance enhancement for the RPi...

    ReplyDelete
  3. Hi, I am trying to upload the Arduino with the send_to_hub, but it keeps showing me the following error message:
    In file included from nRF24_sendto_hub.ino:25:
    ..\nrf24/RF24.h:25:9: error: invalid suffix "add79a5375479cd29a7433c598b8ce56ee60b" on integer constant
    In file included from nRF24_sendto_hub.ino:25:
    ..\nrf24/RF24.h:22: error: expected unqualified-id before '<<' token

    I can't figure out what's wrong.

    ReplyDelete
  4. I've fixed the compile errors, pls re-download the libs, install/overwrite the old ones and compile again...

    ReplyDelete
  5. Thx Stanley,
    no more compile erros.
    Now I am having problem to start the communication.
    It shows in both devices, RPi and Arduino, the RX address as 0x000000000 0x000000000.
    What's the problem?
    I am not using Adafruit's Occidentalis V0.2, because I already used took off the SPI communications of the black list in another project. Is that a problem?

    ReplyDelete
  6. Re-check yr pinout to nRF24L01 on both UNO/RPi..

    Make sure yr VCC is 3.3V ONLY.. not 5V to the nRF..

    Is the SPI comms between UNO/RPI to RPi ok ???

    ReplyDelete
  7. Hi Stanely!
    Firsty, I must say it's a great blog. Very useful I must say :)
    So, here is my situation:
    While i was trying to upload (any) code to arduino i got same errors as Rafael, so:

    \nrf24/RF24.h:25:9: error: invalid suffix "add79a5375479cd29a7433c598b8ce56ee60b" on integer constant
    In file included from nRF24_sendto_hub.ino:25:
    ..\nrf24/RF24.h:22: error: expected unqualified-id before '<<' token

    Debug errors led to to the RF24.cpp and RF24.h files.
    In order to compile code, I had to comment out following parts of code:

    <<<<<<< HEAD
    =======
    and for example:
    >>>>>>> 828add79a5375479cd29a7433c598b8ce56ee60b

    I'm wondering will this have any effect on arduino and Rpi communication, because I can't get them to work properly :(

    Many thanks,
    Borislav

    ReplyDelete
  8. Pls re-download the RF24 libs again, I've updated the codes to remove some previous conflicts...

    I've tested them and they should compile without any errors...

    https://github.com/stanleyseow/RF24

    ReplyDelete
  9. Hi, sorry to bother you again.
    Yes, you were right, they do compile without any errors now. Thank you!

    Well, when I upload nRF24_String_Pingback_RPi.ino to arduino and run rpi-hub on Rpi here is the result:

    http://www3.picturepush.com/photo/a/12981831/img/12981831.png

    Do you maybe have an idea what would be the problem?

    P.S. I triple checked pinout, really...

    ReplyDelete
  10. From the screenshot, yr RPI SPI connection to nRF is OK but the SPI from Arduino to nRF is NOT ok... check yr SPI and CE/CSN pins..

    Ard CE = 8 to nRF pin 3
    Ard CSN = 9 to nRF pin 4
    VCC is 3.3V and NOT 5V to nRF

    ReplyDelete

LinkWithin

Related Posts Plugin for WordPress, Blogger...