Skip to main content
Arduino

Return to Question

Question Protected by Juraj
Tweeted twitter.com/StackArduino/status/919898208163201024
Minor fixes and added erroneous output to answer
Source Link
Greenonline
  • 3.2k
  • 7
  • 36
  • 48

puts Arduino outputs garbage values aton serial monitor with esp8266ESP8266

I have connected my arduinoArduino with esp8266an ESP8266.

When I check esp8266the ESP8266, by manually entering commands at serial monitor i, I get correct results.

ButHowever, when I run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 }
}

I get garbage values where sometimes it has OK inbetween it.an OK in between the output:

" Received: "ÁT OK " Received: "AÔ ÏË " Received: "AÔ OK " Received: "ÁT ÏË " Received: "ÁT OË " Received: "ÁÔ OK " Received: "Á¬ OK " Received: "ÁT OË "

Could someone help me?

puts garbage values at serial monitor with esp8266

I have connected my arduino with esp8266.

When I check esp8266 by manually entering commands at serial monitor i get correct results

But when I run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 }
}

I get garbage values where sometimes it has OK inbetween it.

Could someone help me?

Arduino outputs garbage values on serial monitor with ESP8266

I have connected my Arduino with an ESP8266.

When I check the ESP8266, by manually entering commands at serial monitor, I get correct results.

However, when I run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 }
}

I get garbage values where sometimes it has an OK in between the output:

" Received: "ÁT OK " Received: "AÔ ÏË " Received: "AÔ OK " Received: "ÁT ÏË " Received: "ÁT OË " Received: "ÁÔ OK " Received: "Á¬ OK " Received: "ÁT OË "

Could someone help me?

I have connected my arduino with esp8266.

When I check esp8266 by manually entering commands at serial monitor i get correct results

But when iI run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 }
}

I get garbage values where sometimes it has OK inbetween it.

Could someone help me?

Thank you in advance.

I have connected my arduino with esp8266.

When I check esp8266 by manually entering commands at serial monitor i get correct results

But when i run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 }
}

I get garbage values where sometimes it has OK inbetween it.

Could someone help me?

Thank you in advance.

I have connected my arduino with esp8266.

When I check esp8266 by manually entering commands at serial monitor i get correct results

But when I run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 }
}

I get garbage values where sometimes it has OK inbetween it.

Could someone help me?

Source Link

puts garbage values at serial monitor with esp8266

I have connected my arduino with esp8266.

When I check esp8266 by manually entering commands at serial monitor i get correct results

But when i run this program

#include<SoftwareSerial.h>
SoftwareSerial esp8266(2,3);
void setup() {
 Serial.setTimeout(5000);
 Serial.begin(115200);
 esp8266.begin(115200);
 delay(1000);
}
void loop() {
 delay(2000);
 String command="AT";
 
 esp8266.println(command);
 if(esp8266.available())
 {
 
 while(esp8266.available())
 {
 char c=esp8266.read();
 Serial.write(c); 
 }
 
 
 }
 
 
}

I get garbage values where sometimes it has OK inbetween it.

Could someone help me?

Thank you in advance.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /