Getting error while using AT command on Softwareserial
Posted: Thu Feb 27, 2020 1:15 pm
I am doing a project which requires using esp8266 and Arduino uno. When I try to use AT command to test esp8266 by using Arduino uno, it only shows error. However, AT commands work when I try to use USB to TTL and Realterm. My question is how to make AT command work while using Arduino board. Below is code.
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5,4);
void setup()
{
Serial.begin(9600);
while (!Serial) {
}
mySerial.begin(9600);
}
void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
⸮⸮⸮⸮=!R⸮$A⸮⸮⸮ښ⸮⸮⸮⸮Zښ⸮⸮⸮⸮K⸮⸮χT⸮⸮⸮v⸮X⸮E⸮⸮⸮⸮⸮.⸮⸮|⸮x⸮ڂ⸮Q⸮$҆v⸮⸮
ready
AT
ERROR
My TX pin of Esp8266 is connected to 5 pin and RX pin of esp8266 is connected to 4 pin. And I just directly connected to 3.3 v output of arduino uno for the power source of esp8266. Do I need any external power source or voltage regulator (ex AMS1117) for esp8266? Any help is greatly appreciated. Thanks!
#include <SoftwareSerial.h>
SoftwareSerial mySerial(5,4);
void setup()
{
Serial.begin(9600);
while (!Serial) {
}
mySerial.begin(9600);
}
void loop()
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
mySerial.write(Serial.read());
}
⸮⸮⸮⸮=!R⸮$A⸮⸮⸮ښ⸮⸮⸮⸮Zښ⸮⸮⸮⸮K⸮⸮χT⸮⸮⸮v⸮X⸮E⸮⸮⸮⸮⸮.⸮⸮|⸮x⸮ڂ⸮Q⸮$҆v⸮⸮
ready
AT
ERROR
My TX pin of Esp8266 is connected to 5 pin and RX pin of esp8266 is connected to 4 pin. And I just directly connected to 3.3 v output of arduino uno for the power source of esp8266. Do I need any external power source or voltage regulator (ex AMS1117) for esp8266? Any help is greatly appreciated. Thanks!