Introduction: Simple ESP8266 <> Arduino Uno Software Serial Integration
Our goal was to create an ESP8266 AT command library (based on the ITEAD library), that would work well on software serial on most ESP8266 devices, provided they have firmware that responds to AT commands (which is usually the manufacturer default).
We are distributing this preliminary library for testing and would appreciate your feedback and improvements on Github.
Step 1: Things You Need
Step 2: Wiring
connect the ESP8266 via Software Serial to your Arduino Uno board using a logic converter, as shown in the wiring figure attached.
Step 3: Connect to Your Home Wi-Fi
Download and open the firmware.ino library from Github and enter your SSID and the PASSWORD to your Wi-Fi in the .ino file:
const char *SSID= "WIFI-SSID"; const char *PASSWORD="WIFI-PASSWORD";
Step 4: Upload the Sketch to Your Arduino
Connect Arduino Uno to your computer and upload the sketch.
Step 5: Open Serial Monitor in Arduino IDE
Click on the Serial monitor button in the Arduino IDE (in the top-right corner).
If everything is OK, you should see this output on the serial monitor.
Step 6: Troubleshooting
1. If you get no response, try updating the ESP firmware to the one attached.
Use a 3.3v FTDI board like this one
- Hookup the ESP to the FTDI
- Get the ESP8266Flasher
- Get the 126.96.36.199 Firmware Flash the ESP
2. If you receive partial response from the ESP8266 when using software serial, go to: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src\SoftwareSerial.h
Change line 42: #define _SS_MAX_RX_BUFF 64 // RX buffer size
To: #define _SS_MAX_RX_BUFF 256 // RX buffer size. This will enlarge the software serial buffer.
3. Sometimes setting the baudrate on initialization fails, try resetting the Arduino, it should work fine.
If you have any issues, let us know :)