ESP01 to Arduino Uno - No communication
Posted: Fri Sep 16, 2016 6:57 pm
I can't et any communication between my Arduino Uno and an ESP01.
Everything is wired up correctly (including a seperate 3.3v supply for the esp).
For testing, I've written this code:
And this is the result of it:
As you can see, only gibberish.
What am I doing wrong? I hope someone can help me
When connecting to ports 0 & 1, it works fine (so, there should be an issue with the serialsoftware connection but I cant find what it is).
Thx,
Peter
Everything is wired up correctly (including a seperate 3.3v supply for the esp).
For testing, I've written this code:
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
long int boud_rate_array[] = {1200,2400,4800,9600,19200,38400,57600,115200,230400};
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("Start test");
}
void loop() {
for (int i = 0; i<9;i++){
Serial.println("baud rate: ");
Serial.println(boud_rate_array[i]);
Serial.println("send AT command");
mySerial.begin(boud_rate_array[i]);
mySerial.println("AT");
delay(2000);
while (mySerial.available()){
String inData = mySerial.readStringUntil('\n');
Serial.println("Got reponse from ESP8266: " + inData);
}
delay(5000);
}
}
And this is the result of it:
Code: Select all
Start test
baud rate:
1200
send AT command
Got reponse from ESP8266: ÿÿÿÿ
baud rate:
2400
send AT command
Got reponse from ESP8266: ÿÿÿÿ
baud rate:
4800
send AT command
Got reponse from ESP8266: ÿÿÿÿ
baud rate:
9600
send AT command
Got reponse from ESP8266: ÿüÿþ
baud rate:
19200
send AT command
Got reponse from ESP8266: –þñ
baud rate:
38400
send AT command
Got reponse from ESP8266: I›þ
baud rate:
57600
send AT command
Got reponse from ESP8266: )Ò$þ
baud rate:
115200
send AT command
Got reponse from ESP8266: ¡µÔE¶5‚
baud rate:
230400
send AT command
baud rate:
1200
send AT command
Got reponse from ESP8266: ÿÿÿÿ
baud rate:
2400
send AT command
As you can see, only gibberish.
What am I doing wrong? I hope someone can help me
When connecting to ports 0 & 1, it works fine (so, there should be an issue with the serialsoftware connection but I cant find what it is).
Thx,
Peter