- Sun Dec 07, 2014 12:25 am
#4170
In case anyone is interested in using the esp8266-05, here's what i've found:
1. there is no led that lights when you power the chip.
2. soldering the pins to the 05 is a B!
3. it comes with the latest fw and baud is 9600
4. hold the reset pin low to reset
5. chip draws ~70mA ( i was converting 9v to 3.3v using an lm1117 and couldn't get readable output at any baud rate, turned out my batter was a little low. switched to a new battery and all was well) make sure you have good power, i don't suggest using 3.3v from arduino.
Tried using a voltage divider circuit for the arduino TX to esp RX, but that didn't work. need to look into that. in the meantime i connected this directly and it works fine. but realize i could be doing damage to the esp.
This code allowed me to send cmd's to the esp and receive it's output.
#include <SoftwareSerial.h>
/* This sketch allows entering AT cmds to control
the esp8266-05
*/
// Arduino RX=10,TX=11 connected to TX,RX on esp8266-05
SoftwareSerial mySerial(10, 11);
void setup()
{
Serial.begin(9600);
Serial.println("starting esp8266 comm sketch");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
char cmd[32];
void loop()
{ int i=0;
if (mySerial.available()) // input from the esp8266
Serial.write(mySerial.read()); // write to host
while (Serial.available()) {
cmd[i]=Serial.read(); // buffer cmd
i++;
delay(5);
}
if( i ) { // if host sent us cmd
cmd[i]=0;
mySerial.println(cmd); // send to esp8266
}
}