Go Down

Topic: RF24 Library: Driver for nRF24L01(+) 2.4GHz Wireless Transceiver (Read 106 times) previous topic - next topic

ominously

This is the results from the pingpair_test.pde sketch...

This is using the Mega to transmit:


and this is the Nano as a receiver:


I noticed that both images do not reflect the same "test", but the results are the same no matter what configuration I use..

It receives it, but the mega doesn't receive the ACK... I'm kind of thinking the Mega is faulty. I know the voltage regulator is bad, for sure. I can't even use the barrel plug to power it.

Grag38

the nano receive the packet transmited by the mega because adress TX from mega is RC adress of nano.

But the TX adress from nano is not the RX adress of mega. So from ACK isn't received for the mega.

Considering the pingpair code, you've got :

Code: [Select]

if ( role == role_ping_out )
  {
    radio.openWritingPipe(pipes[0]);
    radio.openReadingPipe(1,pipes[1]);
  }
  else
  {
    radio.openWritingPipe(pipes[1]);
    radio.openReadingPipe(1,pipes[0]);
  }


It shows that there is 2 pipes that allow 2 RF24 to communicate together. Each pipe works in ONE way. That's means that 1 pipe is sending datas in one way, and the other is doing the same in opposite way.

We could show it like considering this code :

The ping out RF24 writes datas on pipe1 and reads data on pipe0

The other RF24 writes on pipe0 and reads datas on pipe1 !!!

We could also show it in another way :

RF24#1 -----pipe0-----> RF24#2
RF24#1 <----pipe1------ RF24#2


In your sketch RX_ADDR_P0-1 are not 'crossed' between the two RF24.

Do you understand what I mean ?

Best regards.




ominously

#102
Nov 01, 2012, 02:28 am Last Edit: Nov 01, 2012, 04:17 am by ominously Reason: 1

----


Thanks for the reply, and I totally understand what you mean... I am truly sorry that I may have confused you with different screen shots. I've re-assembled everything and repeated what I did, and got the same exact result, and created two more images.




I must add that I connected the Nano exactly as maniacbug shows on his blog... As for the Mega, I'm using pins 9/10 for CE/CSN, and then pins 50, 51, 52 for MOSI MISO and SCK. Power is coming from the 3.3v from the Mega, however, I may try to use an external regulator when I get home.

Still majorly confused, and thanks for any help, if any.

Grag38

May be there is an error on wiring mega.

As I read specs of SPI of nano and mega we can discover that :

MEGA :
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimila.

NANO:

SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication, which, although provided by the underlying hardware, is not currently included in the Arduino language.

So, use the PIN 53 instead of PIN10 with the Mega board.

May be it will works as SS means ship select !


ominously

Thanks for the input, Grag... I emailed the guy with the bajdi website, since I seen a thread posted by him somewhere in the forum from google results, and he said that his problem was resolved by adding a 22uF or higher capacitor across the Mega's 3.3v and ground. The problem instantly went away!

I'll post pics later :)

Go Up