Hi here.
Using ESP 01 with arduino UNO in 2 ways:
-
when module connected to tx and rx, arduino reset is connected to GND, so basically arduino is like USB uploader (tried to update firmware) - everything works just fine.
-
when module is connected to custom digital pin and will use serial monitor. But in this case, wifi module ignores all AT commands. Using breadboard supply with 3.3v.
When I trying to send some command via serial monitor, I see that wifi module receives something, his TX led works for a half of second - received command, but I see no updates in serial monitor window.
connects:
ESP GND -> supply GND
ESP VCC -> supply VCC
ESP CH_PD -> supply VCC
ESP TX -> arduino 3 pin
ESP RX -> arduino 2 pin
(I have tried already a lot of combinations and external connections and this one is 'default' I guess)
here is my sample code:
#include <SoftwareSerial.h>
const byte rxPin = 2;
const byte txPin = 3;
SoftwareSerial ESP8266 (rxPin, txPin);
void setup()
{
Β Serial.begin(115200);
Β ESP8266.begin(115200);Β
Β delay(1000);Β Β Β Β
}
void loop()
{
Β delay(1000);
Β Serial.println("Sending an AT command...");
Β ESP8266.println("AT");
Β delay(30);
Β while (ESP8266.available())
Β {
Β Β Serial.println("...");
Β Β String inData = ESP8266.readStringUntil('\n');
Β Β Serial.println("Got response from ESP8266: " + inData);
Β }Β
}