So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Muplex
#60913 IMPORTANT UPGRADE
I try out these wiring scheme (NOT WITH 2 SOURCE OF POWER, ONLY ONE OF THE TWO REPRESENTED IN THESE IMAGE) and these sketch:
Image
Code: Select all #include "SoftwareSerial.h"
SoftwareSerial Esp_serial(8, 9); // RX, TX

void setup()
{
  //Dato che l'ESP, a seconda del Firmware, puoùò essere impostato a Baud Rate diversi
  // scegliere quello corretto tra le due seguenti configurazioni
 
   Esp_serial.begin(9600);   
  //Esp_serial.begin(115200);
 
// Impostazioni della porta per il serial monitor
 Serial.begin(115200); // serial port used for debugging

}

void loop()
{
  if (Esp_serial.available()) // check if the ESP is sending a message
  {
    while (Esp_serial.available())
    {
      int c = Esp_serial.read(); // read the next character
      Serial.write((char)c);  // writes data to the serial monitor
    }
  }
  if (Serial.available())
  {
    // wait to let all the input command in the serial buffer
    delay(10);

    // read the input command in a string
    String cmd = "";
    while (Serial.available())
    {
      cmd += (char)Serial.read();
    }
    // print the command and send it to the ESP
    Serial.println();
    Serial.print(">>>> ");
    Serial.println(cmd);
    // send the read character to the ESP
    Esp_serial.print(cmd);
  }
}



And I get these results


>>>> AT+GMR

AZ+GMR

AT vession:1.1.0/0(May 11 2006 18:09:56)
SDK versioo:1.5.4
ryn1

>>>> AT+GMR

AR¥TJÕ¨H(Q�²•ÉÍ¥½¹éŠrŠr‚r‚Bj…å�ŠŠ'‚Š²ŠÂÒ‚ÊÒª²Jj
SDK version:1.5/4(baaeaebb(
eo. O
>>>> AT+GMR

PÕ¥TJÕ¨H(Q�²•ÉÍ¥½¹éŠrŠrƒr‚Bj…å�ŠŠ"‚Š²ŠÂÒ‚ÊÒª²Jj
SDK vershon:1.5.4(ba`eaebb)
ild3:
>>>> AT+GMR

AR¥TJÕ¨H(Q�²•ÉÍ¥½¹éŠrŠr‚r‚Bk…å�ŠŠ'‚Š²ŠÂÒ‚ÊÒª²Jj
SDK version:0.5.4(baaeadbb)
TC12

I see the light at the end of the tunnel but i don't know comunication is not perfect

Can some one explain me what's happening?
Why the first command respond correctly than characters get mad?
User avatar
By penatenjoe
#60960 Maybe one more hint: you do not need the level shifter for the serial signal ESP8266 --> Arduino since the ESP8266 high signal is high enough for the Arduino. Your log shows this path distorted. I don't expect the level shifter to be the issue, though. Also: having just an electrolytic capacitor on the 3V3 power is likely not enough, you probably have to add something like 100 nF ceramic in parallel to reduce HF noise.