Serial Communication from Arduino nano to ESP8266

i have a problem with receiving of serial communication from esp8266
it is ok if transmit from esp to arduino
but from arduino to esp, it doesn't receive any signal from serial.read
i used softwareserial(3, 1) and (1, 3) nothing work
please help
i also used voltage divider to ensure transmitting voltage to 3.3

I miss the wiring diagram and the code you used. Probably the error is somewhere there but as we don't have the information we're not able to help you.

My NANO (Sender) and ESP8266 (Receiver) are exchanging data very well using SUART Ports: (3, 4) and (D3, D4). The connections are direct as the ESP pins are practically 5V tolerant.

NANO Codes:

#include<SoftwareSerial.h>
SoftwareSerial SUART(3, 4); //SRX = DPin-3, STX = DPin-4
void setup()
{
  Serial.begin(9600);
  SUART.begin(9600);
  Serial.print(" ");
}

void loop()
{
  SUART.print('A');
  byte n = SUART.available();
  if (n != 0)
  {
    char x = SUART.read();
    Serial.println(x);
  }
  delay(1000);
}

ESP8266 codes:

#include<SoftwareSerial.h>
SoftwareSerial SUART(D3, D4); //SRX = D3, STX = D4

void setup()
{
  Serial.begin(115200);
  SUART.begin(9600);
}

void loop()
{
  SUART.print('B');
  byte n = SUART.available();
  if (n != 0)
  {
    char x = SUART.read();
    Serial.println(x);
  }
  delay(1000);
}

Screen shot: NANO
smNANO.png

Screen shot: ESP8266
smesp1.png

Connection Diagram:
uartNanoMasESP.png

smNANO.png

smesp1.png

uartNanoMasESP.png

pin 1 is for hardware Serial. don't use it for SoftwareSerial

Hey, very nice sketch, thanks! Please, could you post a photo or a scheme of connection? I have the same setup and i can't make it work(

GolamMostafa:
My NANO (Sender) and ESP8266 (Receiver) are exchanging data very well using SUART Ports: (3, 4) and (D3, D4). The connections are direct as the ESP pins are practically 5V tolerant.

NANO Codes:

#include<SoftwareSerial.h>

SoftwareSerial SUART(3, 4); //SRX = DPin-3, STX = DPin-4
void setup()
{
  Serial.begin(9600);
  SUART.begin(9600);
  Serial.print(" ");
}

void loop()
{
  SUART.print('A');
  byte n = SUART.available();
  if (n != 0)
  {
    char x = SUART.read();
    Serial.println(x);
  }
  delay(1000);
}




**ESP8266 codes:**


#include<SoftwareSerial.h>
SoftwareSerial SUART(D3, D4); //SRX = D3, STX = D4

void setup()
{
  Serial.begin(115200);
  SUART.begin(9600);
}

void loop()
{
  SUART.print('B');
  byte n = SUART.available();
  if (n != 0)
  {
    char x = SUART.read();
    Serial.println(x);
  }
  delay(1000);
}




**Screen shot: NANO**
![smNANO.png|607x433](upload://5egNoy4cHFd0KsgX2EpXAnKgShW.png)

**Screen shot: ESP8266**
![smesp1.png|607x441](upload://98dQcj1Wo8rUnLR0w3KFoXwyDPX.png)

totsamiynixon:
Hey, very nice sketch, thanks! Please, could you post a photo or a scheme of connection? I have the same setup and i can't make it work(

The connection diagram between NANO (sender) and ESP8266 (receiver) is given below in Fig-1.
uartNanoMasESP.png
Figure-1:

uartNanoMasESP.png

Thank you very much for your response. I work with totsamiynixon. Our problem is that Arduino accepts data from esp, and esp from Arduino does not. Connecting the RX-TX esp to the TX-RX arduino. We use esp8266 v1 and arduino nano 3.0. We drew a simple diagram to show our connection. we made a resistive divider consisting of resistors for 1 kom and 2 kom, which would not burn the port. To supply the desired voltage, we use a DC-DC Converter LM 2596. Please help us understand what the problem may be. Thank you very much

Untitled Diagram.jpg

vova9823:
Thank you very much for your response. I work with totsamiynixon. Our problem is that Arduino accepts data from esp, and esp from Arduino does not. Connecting the RX-TX esp to the TX-RX arduino. We use esp8266 v1 and arduino nano 3.0. We drew a simple diagram to show our connection. we made a resistive divider consisting of resistors for 1 kom and 2 kom, which would not burn the port. To supply the desired voltage, we use a DC-DC Converter LM 2596. Please help us understand what the problem may be. Thank you very much

the divider should convert 5 V of arduino transmit pin to 3.3 V recieved on esp8266 RX pin