I have been searching the internet for a long time how I can connect a "NodeMCU Esp8266" with an "Aurduino UNO" via "SPI". I can't find a tutorial that explains how to do this... There is one that explains it, but the problem is that there are several web pages that say that the "MOSI" and "MISO" cables must have resistances, but according to me the pins of the "Arduino UNO" emit 3.3V and not 5V.
In short, I need the code for the "Arduino UNO" and "Esp8266" to make a "SPI" communication to send a Hello World before doing something else and how to connect them physically (the "Arduino UNO" must be the Slave).
there are several web pages that say that the "MOSI" and "MISO" cables must have resistances
Can we get links to those pages? I don't know of any required resistance for SPI lines, maybe you are confusing SPI with I2C? Level shifters will be needed to interface between devices with different supply voltages.
the pins of the "Arduino UNO" emit 3.3V and not 5V.
The Uno is a 5V board. The pins output 5V. There is a regulator that outputs 3.3V but the max current from that regulator is not capable of, reliably, powering an ESP8266 by itself. Adding a 100uF across the 3.3V supply cap can solve that problem.
Its already beem mentioned in post #1 that you need level shifters (sometimes also called logic level converters) to interface the 5V and 3.3V devices.
So try some Google searches on the topic, there is going to be heaps of stuff about it on the Internet, its a very common problem.
Really? That I answer myself? I said that the voltage was one of the problems that affected communication, but I also need the code, I tried several and none of them send me text, I don't know if it is because of the library or the connections ...
That is why I need the code and the connections (and also the library), because I think what I have is very wrong.
GolamMostafa:
There are quotes in the net from the anonymous users that the NodeMCU's pins are 5V tolerant.
Well, if an anonymous source on the internet said it, then it must be true. Any competent engineer would follow that reference instead of the device's datasheet.
gfvalvo:
Well, if an anonymous source on the internet said it, then it must be true. Any competent engineer would follow that reference instead of the device's datasheet.
I agree with you that the field design/implementation must comply with device data sheets. But, NodeMCU is going with UNO without level sifters (Fig-1). As a demonstration purpose, we may operate them directly for a short period of time (say 2 minutes).
Figure-1: