Does anyone have a simple ESP8266 tutorial?

Correct. Blynk does that for you. So no coding here required from you.

Then that thread that you linked is about using the ESP as a shield with a NANO

Below is link for standalone guide -

Hi, 2 fundamentals to try get your mind around.

First: BLYNK_WRITE() - this is used where you have a widget, lets say a button on your dashboard and when you press it you want the Arduino to do something:

Eg. Button on the dashboard assigned to pin V10 -> in the code something like

   BLYNK_WRITE(10) { //Note the Pin number here that i'm "reading" from the application
  int a = param.asInt(); //Determine the state of the button, either 1 or 0
  if (a == 0) {
    bridge5.digitalWrite(5, LOW); //Here I'm sending the LOW via "DigitalWrite" to an alternate device's (Named bridge5, Look into the bridge function) pin D5 
    } else {
    bridge5.digitalWrite(5, HIGH); //Here I'm sending the HIGH via "DigitalWrite" to an alternate device's pin D5 

The second is virtualWrite:

Blynk.virtualWrite(23, temp); //This sends the value store in the var called "temp" to pin 23 in the dashboard, this is being done in a function called by the timer every 10 seconds to send the temperature to a display widget

Maybe a third thing, Blynk automatically controls digital pins, i.e if you put a button on your dashboard and assign it to D13 (Assuming your Arduino has a built in LED on PIN 13) you don’t need anything more in your code.

This is the concept that is making it harder for me to understand thank you.

Bit of messing around with a few devices on a table and you will be surprised on the number of things Blynk can do, :smile:

I have 4 devices currently deployed around the house to open / close and turn things on / off, still on the workbench is the ESP8266 (via a Nano) that is sending Temp and Humidity data to the application dashboard as well as a second ESP8266-EVB with an OLED screen attached.

Waiting now for Apple to approve the update so we can get a few additional functions to test.

So last question and I may have this down. If I am using an esp8266-01 the one that only has 2 GPIO pins available. Would those be V0 and V1?


Your comments are a bit confusing.

At the beginning you ask about:

I gave you a link on how people get DHT22 working with ESP8266. I also gave you a link to another step-by-step tutorial about standalone ESP8266+Blynk

Then you say:

What actually you need? Read sensor data or switch GPIOs ON/OFF ?

Next, have you successfully compiled Blynk on your ESP8266 ever?

If you need switching GPIOs - then no code is needed. Just connect an LED to the GPIO, Open app, select this GPIO in PIN field. Press PLAY - it should work.

If you need getting DHT22 data - follow @Bobbo_SA comments. You can also check another tutorial on Virtual Pins:

So if I am controlling the state of a GPIO pin Blynk will handle that control but if I am reading data from a module I will have to write the data to the virtual pin?

You can read data directly from the Analog Pin without any code: choose input widget (Graph, Gauge, Value Display…), set the PIN, set the frequency of requests (how often data should be refreshed) and you are done.

But DHT22 sensor is an I2C device, so Blynk can’t read data from it directly. This means you have to:

  • get this data on your own (using a DHT library or by writing your code - we don’t care)
  • somehow push this data to the Blynk app. And here is why you need to use Virtual Pins - they are designed specifically for such cases.

Take a look at this example and read all the comments carefully. Especially about the timer. Don’t pay attention that this is Arduino example and that it’s about Ethernet. After establishing Internet connection, Blynk works the same on every platform.

I agree with Pavel here. You see the reason i made the step by step tutorial is because beginners like me easily give up when things don’t go our way. I believe tinkering is a learning process. And yeah read comments carefully, there are usually some changes required that must be adjusted either on the ino sketch or app end.
Maybe when Im free I going to make a video tutorial! You must see to believe. The feeling I got when I finally managed to switch the LED over the net cannot be expressed in words.

Well to be honest programming micro controllers with Arduino is fairly easy but you need to be committed to it. Also for me it was a lot easier when i started because I had programming background mainly in C and C++ so all I had to do was to understand electronics better. It gets tricky when you get to real micro controller programming (assembly or in better case C however operating pins directly here by using registers.) Honestly all you need at the beginning is understand electronics how basic things work and learn C. But you have to be committed and focused on your project. If you know your goal then write an algorithm on pice of paper or in your head that has to be followed then implement it in Arduino IDE or whatever you want.

Always remember to implement failsafe functions, think of human mistakes when operating your hardware and of program mistakes, as an example my irrigation system is controlled by Blynk and also some scripts. It’s designed in a way that even when internet connection drops the system still can work because tasks are executed based on current time and stuff like that. However once when connection dropped in a middle of me setting timer after 7 hours or so when i wake up the water was still turned on and hundred liters of water were wasted because of one stupid mistake: I opened valves, but in the middle of programming timer the internet connection dropped and arduino had no idea it should turn off valves after 30 min. This is just one of hundreds examples of how important it is to carefully write code and think through your idea and algorithm.

However this is a lot of fun and its rewarding when you actually see your stuff working so trust me it’s worth spending hours.

I really appreciate all the help you have all provided. Last night I was able to get my Raspberry Pi up and running controlling 3 LEDs as a test via the application and today I was able to get the ESP and DHT to send over the temp correctly.

Again thank you very much.

1 Like

Glad you made it!

:tada: :tada: :tada:

Here you have plenty ESP8266 tutorials:

ESP8266 Arduino IDE

ESP8266 tutorials

1 Like

Here you can find a complete ESP8266 Blynk Example. If you are not familiar with ESP modules I recommend you this thorough ESP8266 Arduino Tutorial, a complete review with many example and everything you need to know.

This thread is almost 2 years old. Please check the dates before posting helpful tips :slight_smile:

1 Like

I don’t see the problem, this subject is still hot, and also 1st google page, so many people will still bump into it. It helped me, hopefully will help others too.

Bumping old threads with a nice little helpful note is not a good idea.

These people had issues when ESP’s were not very popular or well supported. Blynk and general knowledge of ESP’s has come a long way and there are also Official Blynk examples (with ESP) to follow now.

@Dmitriy, worth closing this thread?

1 Like

@Jamin seems fine for me. Very nice tutorial and related to topic theme.

@Dave1829 I don’t understand your hate. I don’t want to be special, and yes its just another blynk tutorial, hopefully a better one, as well as Iphone is just another smartphone but simply better. Chill out or just delete my comment if it bothers you!


Guys please calm down and don’t take anything personally please. We are all on same line.

1 Like