Serial communication between ESP-01 and UNO

When sending a limited amount of data from ESP to UNO I am reeiwing someting like that.

bB׆QZ���ȤSW`��b��
�.I �
SDK:2.2.2-dev(38a443e)/Core:3.1.2=30102000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386

UnoSerial is listening!

UnoSerial is listening!

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

Exception (4):
epc1=0x402010e8 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffe40 end: 3fffffd0 offset: 0160
**3fffffa0: 3fffdad0 00000000 00000002 3ffee6b0 **
**3fffffb0: 3fffdad0 00000000 3ffee684 40201f34 **
**3fffffc0: feefeffe feefeffe 3fffdab0 401010cd **
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Any idea?
Thank you

post your code please

On ESP transmitting side:

void setup() 
{
  Serial.begin(9600);

}

void loop() 
{
  i = 0;
  if(Serial.available()) // Check for availablity of data at Serial Port
  {
    while (i < 5)
    {

      Serial.write("sample"); // Printing the Serial data
      Serial.flush();
      delay (1000);
      i = i + 1;
    }

  }
  i = 0;
  while (i == 0)
  {

}

}

On UNO receiving side:

#include <SoftwareSerial.h>

SoftwareSerial UnoSerial(2,3);

// variables definition
String data;

void setup()  
{
  Serial.begin(9600);
  UnoSerial.begin(9600);

}

void  loop()
{ 

  if (UnoSerial) 
  {
   
    Serial.println("UnoSerial is listening!");

   data = UnoSerial.readString();
   

    Serial.println(data);
 
  } 
  else 
  {
    Serial.println("UnoSerial is not listening!");
  }
  
}

This will be an infinite loop which will trigger a WDT exception. Run the exception decoder and see if it indicates this line.

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