Arduino Nano not working with ESP
Posted: Wed Mar 04, 2015 2:13 pm
Hello ESP world. I am looking to use the ESP to send / receive greenhouse information using an online web server.. ESP seemed like a great cheap option. I ordered an ESP8266-01 (baud 115200) and connected to arduino nano to the ESP as follows, 3v3-3v3, GND-GND, RX-RX, TX-TX. I tried out testing basic ESP input and looked to get a response on the serial monitor. here is my arduino code:
and here is the serial output on 9600 baud- it seems to want to say something but it's gibberish.
Also a note, whenever I connect the CH_PD pin on the ESP8266 to 3v3 in addition to just 3v3 on the ESP, I am unable to upload sketches, the IDE tells me that the serial port is already in use.. in case that might be related. Any help is appreciated!
Nate
Code: Select all
#include <SoftwareSerial.h>
SoftwareSerial esp8266(1,0);
void setup()
{
String response = "";
Serial.begin(9600);
esp8266.begin(115200);
Serial.println("hello world");
esp8266.print("AT+RST\r\n");
while(esp8266.available()) {
char c = esp8266.read();
response+=c;
Serial.print(c);
}
Serial.println(response);
esp8266.print("AT+CWMODE=2\r\n");
while(esp8266.available() {
char c = esp8266.read();
response+=c;
Serial.print(c);
}
Serial.println(response);
esp8266.print("AT+CIFSR\r\n");
while(esp8266.available() {
char c = esp8266.read();
response+=c;
Serial.print(c);
}
Serial.println(response);
and here is the serial output on 9600 baud- it seems to want to say something but it's gibberish.
Code: Select all
hello world
ðð (then a bunch of boxes)
ðøððø
àððøà
Also a note, whenever I connect the CH_PD pin on the ESP8266 to 3v3 in addition to just 3v3 on the ESP, I am unable to upload sketches, the IDE tells me that the serial port is already in use.. in case that might be related. Any help is appreciated!
Nate