I've been using nRF24L01 wireless chips for a while; now I need to build a 2-channels communication between my 2 arduinos, so I wonder if I may connect 2 nRF24L01s to one arduino. Since in each sketch I need to specify CE and CSN pins I thought I could create 2 RF24 objects in one sketch, using 2 available data pins. My question is , what about SCK,MOSI,MISO,IRQ? Could I share the same pins for both chips?
Thanks
The modules already are capable of 3 bidirectional transfers and allow 6 channels at a time.
You could share SCK, MOSI & MISO. SPI is a bus so it's designed for this. As for the IRQ, you would probably want separate pins so you could know which radio generated the interrupt.
If I recall, @hammy was doing something similar recently with 2 radio modules.
Thank you! I'll get right on that!
Yes ..ended up with three , there are examples out there that I based mine on .( 2 receive data , 1transmits data onwards which was first - could just use two I think )
All pins except csn and int were paralleled up.
Csn was wired to different pins for each radio and configured in the code for those pins.
Each radio is turned on and off in turn by the csn pins to avoid conflicts
I used the interrupt pin to signify data was received ( wired to the 328 interrupts ) -the int line from the radio rising (?) again after the data is read from that specific radio ..
Each radio on a different frequency
Used a single 328
Wow! Excellent feedback! I'll get right on it! Thank you very much!
maybe a stupid question, but:
since RF24 library only allows you to specify CE and CSN pins on creation, how do you handle the different IRQs in the code?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.