Arduino + ESP8266 AT commands

I have a question. How can I send AT commands with Blynk sketch? I can do it with empty sketch through Serial, but with Blynk I don’t know how to do it… Help me pls.

Thanks, but I think it isn’t it. I speak about how to send AT commands and listen to answers using Blynk (it works without Blynk but with it I can’t send any commands)

Did you study the document @julianpetriv?

'3. Use your USB-UART TTL converter, or this sketch to access AT command console

Not sure what you need here… The AT commands are to set up the ESP for serial communication with the Arduino so that Blynk (on the Arduino) can link through to the Server (via the ESP’s WiFi).

I am sorry, English is not my native language… I have this sketch:
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Servo.h>
#include "IRremote.h"

IRrecv irrecv(3);
decode_results results;

char auth[] = "e4b54ae218a142fdabe3c5c351932031";

char ssid[] = "Julian";
char pass[] = "julian04072002";

#define EspSerial Serial

#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

Servo servo;

BLYNK_WRITE(V0) { servo.write(61); delay(500); servo.write(90); }

void setup() { irrecv.enableIRIn(); EspSerial.begin(ESP8266_BAUD); delay(10); Blynk.begin(auth, wifi, ssid, pass); servo.attach(2); servo.write(90); }

void loop() {; if(irrecv.decode(&results)) { if(results.value == 0xFFA25D) { servo.write(61); delay(500); servo.write(90); } irrecv.resume(); } }
I want to ping my local PC and write to virtual display 0 or 1. I know AT command AT+PING<ip>.
How to made it using Blynk sketch?

@julianpetriv which Arduino are you using i.e. Nano and Uno with a single serial port or a Mega and Leonardo with several serial ports?

From the link to the Blynk sketch it creates a serial coms link called ser2 (hardware for Mega / Leonardo or software for Nano / Uno).

Then it’s simply:


I am using Arduino Uno but I’m using hardware serial

So I need to do EspSerial.println("AT+PING<ip>")?

With a USB2TTL adaptor?


No. Arduino hardware serial. Without USB2TTL. So Blynk is started on Arduino, not on ESP. ESP just gives WIFI

Thanks, I will try

@julianpetriv so you are working blind without Serial Monitor debugging, right?

@julianpetriv Can you clarify…

Are you using an Arduino UNO, wired to an ESP8266 via UNO pins 0&1 (Hardware serial), and have the whole combination of UNO/ESP connected to Blynk Server (via WiFi) and running a Blynk sketch… and then you ALSO want to send an AT command to the ESP to ping another IP address?

If so then I don’t think you will be able to do that… as that would interrupt the UNO/ESP link and stop the sketch from running (like changing your oil while driving down the road).

You’re right. But Blynk sends commands like AT_CWMODE=1, isn’t it?

Sorry, I don’t really know how Blynk communicates through the ESP… but I suspect that AFTER the initial setup, using AT commands, the ESP just becomes a transparent Serial-to-WiFi bridge adapter.

Thanks for help.