esp8266 with nrf24L01 and arduino SPI

Robin2:
I believe the ESP8266 connects via a serial port and I know the nRF24 connects using SPI

Sorry I hope I'm not hijacking his thread by asking this, but I believe he has got already the answer on his question.

Robin can you explain me what SPI is exactly? Because I wanted to work with ESP, NRF and maybe Bluetooth but I didn't know about this to be honest.
Serial is just the serial communication from the Arduino I think, but what's SPI? (And is Wire.h something like SPI as well, or is that something different :D?)

akatchi:
Robin can you explain me what SPI is exactly?

You are hijacking a Thread so I have suggested to the Moderator to move your question to its own Thread.

SPI stands for Serial Peripheral Interface. Google will get you much better information than I can.

You can also read about the Arduino SPI library in the Reference section.

...R

Robin2:
You are hijacking a Thread so I have suggested to the Moderator to move your question to its own Thread.

SPI stands for Serial Peripheral Interface. Google will get you much better information than I can.

You can also read about the Arduino SPI library in the Reference section.

...R

Ah thank you, I googled it and it gave me lots of information.
Just to make sure, with NRF24 module, the master and slave can send to each other right? Not only the master to the slave?
And also the master can send data to multiple slaves, and each individual slave can send data back, but not slave-to-slave, is that right?

Your description of the capabilities of the nRF24 is a little muddy.

The nRf24L01+ is a transceiver so it can both send and receive data. It is up to the user program to decide how to make use of the features.

The first example in my Simple nRF24L01+ Tutorial is for simple one-way communication. The second and third examples illustrate different ways of implementing two-way communication.

It is a matter for the user program to decide if one device should be a master and what, exactly, it means to be "master". In general any nRF4 can send to any other nRF24 if it knows the address of the receiving device.

You need to decide on a set of procedures for your communication to ensure that it works smoothly. For example if two devices alternately talk and listen there is a significant risk that they will either both talk or both listen at the same time and then communication fails.

You should also be aware that only one device can transmit on any channel at one time. If two devices operating on the same channel transmit at the same time both messages will be garbled. Even though there are 6 "pipes" there is only one receiver and one transmitter.

The idea of pipes can be a bit confusing, especially as many example programs use the variable name "pipe" for the address. Think of them as 6 shelves onto which the mail for different residents in an apartment block can be placed. All the letters come through the same mail slot and when they fall on the floor someone picks them up, looks at the name of the recipient and puts them on the correct shelf or shreds them if they are for a recipient who lives in another block.

Careful study of the rather impenetrable Nordic datasheet is very useful. But don't expect it all to make sense in the first 5 readings :slight_smile:

...R

Thanks Robin, so if I have my 1st NRF module send an 'a' to the 2nd NRF module and the Arduino connected to the 2nd arduino will see the message 'a' and blink up an LED for 1 second and then the 2nd NRF module will send a 'b' to the 1st NRF module so it knows that it was a succes, that will work right, because there's a delay in the communication.

The auto-acknowledge system that is built into the nRF24 is a much simpler way to achieve confirmation of a successful transmission. The nRF24 has extensive error checking and an acknowledgement will only be sent if the full message is received correctly. There is also provision for automatic re-trying if the acknowledgement is not received.

Having said that, what you describe could be implemented using the 3rd example in my Tutorial. But you need to consider what should happen if ArduinoA does NOT receive the expected message from ArduinoB (including why that response might fail). And IMHO the automatic acknowledgement system avoids that sort of complication.

...R