Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Communication between Arduino through Xbee not working.

Status
Not open for further replies.
First compile and upload the sketch to UNO and then modify Mirf library for Mega2560 and then upload sketch to Mega2560 board.

You have to change pin connections here. It is in the Mirf.cpp file

Code:
Nrf24l::Nrf24l(){
	cePin = 9;
	csnPin = 10;
	channel = 1;
	payload = 16;
	spi = NULL;
}
 

Okay,now I tried to connect the MRGA and I used the 50,51 & 52 SPI pins but its not working,let me try this now
 

I will soon post sketches for Tx and Rx for nRF24L01 coomunication using Arduino. Have you used voltage dividers on the required lines because nRF24L01 works from 3.3V and Arduino works at 5V.
 

If you connected nRF24L01 to 5V pins of Arduino then nRF is already damaged because it can't tolerate 5V. Change nRF before testing and used voltage dividers on all nRF lines.

Use Mirf Library.

According to my iTead Nano IO Shield Ce and Csn pins are 9 and 10. So, I modified Mirf.cpp like this.

Code:
Nrf24l::Nrf24l(){
	cePin = 9;
	csnPin = 10;
	channel = 1;
	payload = 16;
	spi = NULL;
}

Arduino latest used library from Documents\Arduino\library

If you have libraries installed at two places in Program Files\Arduino\libraries and Documents\Arduino\libraries then edit Mirf.cpp at both places and according to your pin connections.

I have tested the code in hardware and it works fine and led on D7 (pin 7) blinks once every 2 seconds.

Tx sends Led Status and Receiver blinks the LED based on Led Status data received.
 

Attachments

  • Mirf.rar
    937 bytes · Views: 53

Okay,Thank you very much.I directly connected 5V to my old NRF24L01 chips,so i think they are already damaged:).Anyway my IO shield will reach here in 2 or 3 days(the same one that you shared the link) and once I get it I can test the code in real hardware.

BTW if you don't mind,is there any proteus model available for NRF24L01?
 

On some page I saw there is model for nRF24L01 but don't remember the link.
 

Okay,I have searched a lot but I couldn't find out any,In any time if get that webpage kindly let me know

Thank you

- - - Updated - - -

Let me ask you one more think I am planning to buy these arduino nano **broken link removed**
And this NRF board **broken link removed**

Do you think both of this are compatible with arduino nano shield,the one that is with you now?
 

Yes. I am having the same Nano and nRF but I purchased from banggood.
 

Okay,Thank you very much.BTW all of the nanos are 5V or is there any 3.3V versions?.The IO shied is compatible with 5V version ..right?
 

Nano's are all 5V versions. Arduino Mini Pro is available is 5V and 3.3V version. The pinouts of Mini Pro and nano Are same but Mini Pro is smaller. You can request iTead to make a Mini Pro nRF and XBee Shield for 3.3V type Mini Pro or you can make it yourself because you don't be needing voltage level translators. You can directly connect 3.3V type Mini Pro's nRF pins to nRF socket.
 

Okay,Thank you very much.As I already bought NANO compatible IO boards now I have to use the nano itself.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top