SPI communication question

I seen examples in Internet about SPI communication but they are not enough.

I have Arduino uno connected to ESP 8266 thru SPI.

I want Arduino uno SPI master to both send and receive data.

And I want ESP 8266 SPI slave to both send and receive data.

Can you give me a code example of this?

Can you afford to operate ESP8266 as SPI-Master and UNO as SPI-Slave?

No idea of the procedures of initializing ESP8266 as SPI-Slave.

Yes you are correct.

Maybe only ESP8226 can send data…

Maybe I will not use SPI then I will use RX - TX as serial, I will add a switch (ON/OFF) to disconnect them if I upload my code.

You don't need to add a switch, that's what the programmer does with the reset pin.

mikechale:
Yes you are correct.

Maybe only ESP8226 can send data...

Maybe I will not use SPI then I will use RX - TX as serial, I will add a switch (ON/OFF) to disconnect them if I upload my code.

You may use software serial ports (SUART) for both ESP8266 and UNO in order to keep the (hardware) UART Ports remain connected wit their respective IDE/SM for uploading/debugging sketches.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.