GOAL
From Arduino UNO, send AT commands to ESP8266 via a SoftwareSerial port and receive results.
CURRENT STATUS
I either send AT commands and get nothing back (wiring scheme 1) or I send AT commands and get garbage back (wiring scheme 2).
Using the Arduino as a pass through (as explained in the tutorial listed in the resources section), I can send AT commands. I have found that I can communicate with the ESP8266 at 115200 baud.
This is the results of running AT+GMR
:
AT version:0.40.0.0(Aug 8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04
WIRING SCHEME 1
!! I have the green wire attached to pin 3 on the Arduino Uno and the yellow wire attached to pin 2; not 1 and 0 as the picture suggests !!
WIRING SCHEME 2
Same wiring as above, but I have RX and TX reversed. The green wire is attached to pin 2 and the yellow wire is attached to pin 3.
CODE
This is running on Arduino Uno
#include <SoftwareSerial.h>
SoftwareSerial esp8266(2, 3);
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Started");
// set the data rate for the SoftwareSerial port
esp8266.begin(115200);
esp8266.write("AT\r\n");
}
void loop() {
if (esp8266.available()) {
Serial.write(esp8266.read());
}
if (Serial.available()) {
esp8266.write(Serial.read());
}
}
RESULTS FROM RUNNING SKETCH
Wiring Scheme 1
Started
Wiring Scheme 2
Started
�����
I have tested the ESP8266 via the instructions listed in the tutorial in the Resources I've Used section below. The ESP8266 works just fine when sending it instructions via the Serial Prompt.
RESOURCES I'VE USED http://rancidbacon.com/files/kiwicon8/ESP8266_WiFi_Module_Quick_Start_Guide_v_1.0.4.pdf
QUESTION
Does anyone know if what I am trying to do is possible? And if it is, what am I doing wrong?