Basic usage instructions


Sorry you are right I didn’t mentioned any hardware.
So I upload the AT firmware on the ESP8266 and set it at 9600, I connect it trough UART, on Blynk I set Arduino nano and Serial software, I upload my sketch including the Blynk parts.

On the smartphone I will pair; for example, the led to my physical DO where it is connected the LED itself, in case of graph I associate to the tace the variable and so away…




Do I have to connect the Esp8266 to the WiFi using AT commands before starting?



I think you should work through the getting started information at

then when you have mastered the fundamentals, start adding your own sensors and code etc.



No, that’s the purpose of the Blynk.begin command.

As @DaleSchultz says, doing some reading would be a good thing.




Sorry but Blynking.begin doesn’t know about SID and Password.
I tried to connect only ESP8266 and it is fine, I have been able to switch a led on and off.
But for me is not clear how to do with my hardware, I’m reading here for two days long, but sorry, I didn’t found any starting explanation with example.
Of course I don’t want a ready made thing, but just a simple way to start

ESP8266 connected to Arduino Nano trough UART, two sensors connected to the Nano trough I2C, a LCD display and a SD card for logging.
I would like to see the datas from remote just to monitor the sensors.

Tonight I connected ESP with AT Fw to Nano and the serial monitor is always showing XXXXXconnecting… row by row scrolling down.



The ESP is flashed with AT firmware and becomes a simple Serial to WiFi transceiver.

You set your App and IDE for the Arduino device… and that it the device you program, not the ESP.



Good morning and thanks for answering.

I tried to send SSID and PASSWORD by at command and I got OK CONNECTED from esp, but this is just a test.

Now following the steps, I wonder where I specify the SSID and PW, without them I don’t think the device is able to get connected.



In your arduino sketch, as part of Blynk.begin()

Blynk.begin(auth, wifi, ssid, pass);



Sorry but nothing is clear…

Have a look at the sample sketch from Blynk and tell me where is getting SSID and PASSWORD and how is possible to get connected to the network without them parameters!!!

  Download latest Blynk library here:

  Blynk is a platform with iOS and Android apps to control
  Arduino, Raspberry Pi and the likes over the Internet.
  You can easily build graphic interfaces for all your
  projects by simply dragging and dropping widgets.

    Downloads, docs, tutorials:
    Sketch generator: 
    Blynk community:  
    Follow us:        

  Blynk library is licensed under MIT license
  This example code is in public domain.

  =>          USB HOWTO:

  You’ll need:
   - Blynk App (download from AppStore or Google Play)
   - Arduino Nano board
   - Decide how to connect to Blynk
     (USB, Ethernet, Wi-Fi, Bluetooth, ...)

  There is a bunch of great example sketches included to show you how to get
  started. Think of them as LEGO bricks  and combine them as you wish.
  For example, take the Ethernet Shield sketch and combine it with the
  Servo example, or choose a USB sketch and add a code from SendData

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <BlynkSimpleStream.h>
#include <SoftwareSerial.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";

SoftwareSerial SwSerial(10, 11); // RX, TX

void setup()
  // Debug console

  // Blynk will work through SoftwareSerial
  // Do not read or write this serial manually in your sketch
  Blynk.begin(SwSerial, auth);

void loop()
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!


So as to beat others to saying it before you enter code hit 3 back ticks on my keyboard it is just beside the #1 ``` .
Enter your network credentials in the sketch builder as highlighted in pic.



I see this, but I’m using NANO with ESP8266-01 and if I do what you showing me, i get compiling error abou “Serial1 not defined in this scope”



I think that at this stage it’s worth pointing out that your hardware combination is rather unusual, so you wont find an out of the box solution. Some experimentation will be required, and if you read the code comments, and research the Uno and Mega boards, you’ll see that the Uno has one UART and the Mega has three.
The code says…

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1

// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

in other words, this is universal code that can be used on a variety of different Arduino boards by commenting/deleting some lines of code and removing the code for other lines.

Your initial; post indicated a degree of familiarity with C++ programming and devices, so several of us have made the mistake of signposting you in the right direction without actually going into much detail. Part of the reason for that was probably that we’ve never come across this hardware combination before, but we have no reason to think that it wouldn’t work - with some tweaking of code and experimentation.

If you’re new to coding in general, or to IoT projects, then you might be better looking at a different solution. Personally, I’d be basing this project around a Wemos D1 Mini rather than a Nano + ESP-01




There is no such thing as SSID/Password needed for a USB link type of connection :stuck_out_tongue_winking_eye: You are using the wrong example.

I already showed you one with ESP as shield.

Because the Nano, just like the UNO, requires the use of SoftSerial for the ESP link since they do not have a 2nd hardware serial port (AKA Serial1)



Hi, but I didn’t say to do trough USB, I need to see some signal from wifi.



Then don’t use that example and then ask us why it wouldn’t work with WiFi :wink:



@Gunner ok, I apologize, but I’m getting crazy, so if you have something to suggest, kindly do it! :wink:



That is what he did. He said that you are using the sample sketch for USB connection, not WIFI.

Maybe try this one.

Although I dont think I have heard of connecting an esp for wifi through i2c.



The whole USB connection thing is my fault. I signposted @attiliovolpe towards the the Arduino Nano section of the sketch builder and USB just happened to be the option that was selected at the time.

I’d assumed from his first couple of posts that @attiliovolpe had more skills and experience in the area than he apparently has and that all he needed was pointing in the right direction. I explained some of this in post #17, but we still seem to be stuck on the USB connection thing.

I really do think that given the skill levels involved, a switch to a NodeMCU or Wemos D1 Mini instead of the Nano/ESP-01 combo would be by far the simplest way of moving this forward.




If you insist on the Arduino with ESP as shield thing, then start looking here, as I previously linked to…

Otherwise pick up a standalone ESP development board as @PeteKnight suggested and save some dual-device connectivity efforts.



In my life I’m used to never give up!
Now all is fine and connected, apart from some syntax error, I had wrong fw on the ESP, I discovered changing the ESP with another one.

Thanks to everyody you, we will see with all the rest.