1

I have bought 2 Arduino Giga R1, 2 nRF24L01+ modules and 2 nRF24L01+ adapters. I am using the Arduino SPI in order to connect it with nRF24L01+. And I am using the following code with this change in the code only:

RF24 radio(7, 10); // CE, CSN

This is the Arduino GIGA R1 SPI documentation, and this is the nRF24L01+ modules, and the related adapter (the links of the modules are from a random Google search, just to show you the images + the documentation of the modules).

However I don't see something working. I added the following command both in the Receiver and Transmitter codes:

SPI.begin();
SPI1.begin();

in order to activate both SPI of each Arduino, because I don't know which is which. The result: Nothing works on Arduino GIGA R1... The same code above works fine on Arduino MEGA 2560 R3, so all the modules and the code are fine. The problem is on Arduino GIGA R1...

I supply the nRF24L01+ and the related adapters with 5V/1.5A power supply. I supply each Arduino GIGA R1 with 5V/1.5A power supply.

I have also tried this code, and I got this message:

We have lost connection, preventing unwanted behavior

Does anyone has any idea how to make the 2 Arduino GIGA R1 communicate via the nRF24L01+ link?

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Oct 23, 2023 at 20:13
4
  • please no links to code and no pictures of code ... copy your code and paste it into your question ... format as code Commented Oct 23, 2023 at 21:59
  • I cannot copy paste code from other sites. There are terms of use in every website. It is not my code... Commented Oct 24, 2023 at 9:59
  • then how do you know that the code has no errors? Commented Oct 24, 2023 at 15:13
  • It runs if I use Arduino MEGA 2560 R3 instead of Arduino GIGA R1. Commented Oct 24, 2023 at 17:30

2 Answers 2

3

Not sure if you found a solution but I had a similar problem and found a solution, which may work for you.

As you know, the Giga has two SPI buses. The default are the ones on the ICSP header, the second one is on pins 11-13.

The NRF24L01, by default, assumes that you want to use the default one - SPI in this case. If you want to use the other one (SPI1), all you need to do is call begin on SPI1 and pass that to the NRF begin function, as follows:

 SPI1.begin();
 radio.begin(&SPI1);

This worked for me, hopefully it will for you as well.

answered Jan 12, 2024 at 5:17
-1

I just want to note that You Do Not Need An External Antenna module, because the Arduino Giga R1 has a micro UFL antenna connector, and an antenna is shipped with every arduino giga(sorry for you if they forgot to include it in your one), However It IS probably more for wifi porpuses than enclosed communication, still the nRF24L01+ is a great way to actually communicate between two mcu's, especially if an mcu doesnt come with a built in wifi or some sort of wireless communication

answered Feb 5, 2024 at 21:41

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.