Internet of Things for non-programmers with Arduino, Blynk and ESP8266-12F

The answer is NO! You don’t need to be a programmer to make Internet Of Things automation projects!

Many people ask me this days what is Internet of Things and can you make it without codding skills. In this article I will demonstrate how to control things via smartphone with ESP8266 WiFi Module and Blynk platform without writing any line of code. There are a lot of people eager to transform things into smart and connected devices, and that because people, in general, tend to control everything. I know, for instance at least five engineers over 40 years, very skilled in electronics but with almost zero knowledge in programming. Some of them didn’t had the chance to learn, other are simply not interested or not prepared, but everyone is very interested in controlling stuff over the internet. Also other friends with no interest in engineering are becoming attracted by the remote monitoring and control possibilities nowadays.

How to build Internet of Things projects with Blynk, Arduino and ESP8266 having Zero programming skills

Project goal

This is a 30 minutes project (considering you have all parts), and should give us the possibility to control 5 individual channels remotely with a smartphone from anywhere in the world, without writing a single line of code.

In the below image you can see the wiring sketch, probably a rudimentary setup for most of you, but hopefully simple enough for non technical people.

The WiFi Controller – ESP8266 ESP12F – quick overview

The controller device used (ESP-12F) is probably the best WiFi Arduino compatible module for Internet of Things projects, available on the market considering the price of ~5$. If you already played with an ESP-01 module, the uploading firmware process is exactly the same, you can easily upload you sketches using one of the many methods available.

If this is your first IoT project, you definitely need to read this ESP8266 Arduino Tutorial to have a better understanding about the flow.

At this moment, almost all WiFi ready development boards based on NodeMCU are based on ESP12 because of its huge power for such a low price. The ESP12 series features 9 to 11 digital GPIOs ready to send both logical or PWM signal, dedicated ports for I2C and UART, a 32bit MCU and a complete set of WiFi capabilities. The ESP8266 12 Series can be programmed by LUA, Arduino, Python or directly via AT commands. Sleep modes and low power consumption made this little board one of the most complete WiFi solution for Internet of Things projects. The module needs to be powered with 3.3V and the highest spike in data transmission goes up to 250mAh drain.

The only downside is that if you buy it as standalone, it doesn’t come with a standard pin-out format, you need to either improvise some welding or just buy a very cheap dedicated adapter board ready for prototyping (see price on Amazon).

Blynk is an amazing Drag and DropIoT application builder for development boards like Arduino, ESP8266, Raspberry, SparkFun and many other platforms. This wonderful application that can be installed in both Android and IOS, gives us the possibility to build a digital dashboard by dragging multiple interfaced widgets that can directly communicate with the development board. Installing the application is easy and free for entry projects, the number of widgets that can be used is limited by level of energy which is used by every control activated. To get more energy you need to pay but the good part is that price is very low.

The working principle is like a chat program. Both the development board and the Blynk app connects to a central Blynk server (cloud) and using an authorization token opens a communication channel which allow them to talk each other trough a push / socket system. That means that the communication channel is bidirectional and asynchronous, exactly what we need for an interactive project. The good news is that if you have large projects or you need a very high up-time rate, you can install your own server and use it instead of the free cloud solution. Files and documentation can be found on the official Blynk website where you can also find a nice community.

STEP 1 – Loading the Blynk Sketch into the ESP8266 board

In order to take your development board into the game, in our case the ESP8266 ESP12F, we need to download the Blynk library for Arduino and load a standalone simple Blynk sketch into it. To do that, open the Arduino IDE, go to the Sketch menu and open the Library manager. Once opened you can search the library by the Blynk keyword and install it.

After you installed the Blynk library, Its recommended to restart your Arduino IDE. Allot of Arduino Blynk examples should be available now under Examples menu as in the image below. Open the Blynk ESP8266_Standalone example:

As I promise you, despite this sketch contains Arduino code, we will not change anything but use it as it comes. The only things that we need to update, are the Authorization Token and your router WiFi credentials. The authorization token can be obtained once you install the Blynk app on your smartphone as you will see in the next steps.

After you completed the proper Authorization Token and the WiFi credentials, make sure you have selected the proper board, the Generic ESP8266 Module in my case, and your module is now in DOWNLOAD Mode. Usually all ESP8266 boards can be booted in DOWNLOAD mode by pulling the GPIO 0 to LOW while reseting.

Open your Serial Monitor, hit the upload button, and if everything goes fine, you should see a message like in the next image.

STEP 2 – Setup the Blynk App on your smartphone

In order to install the Blynk app on your smartphone, go to the Play / Market app and search for Blynk, the original app with the green icon should pop the first in the search results. Install it, open it, and login. I used my Facebook account to login, the only thing important is to have a valid email in order to receive the Authorization Token.

If you have logged on, you should now be able to create a new project by pressing the obvious button. After setting up the project name, the app will request to select your hardware, and here you should point to whatever development board you have (in my case the ESP8266).

Another important setting is the connection type. This application covers not only the WiFi boards, but it can manage the USB, GSM or Ethernet too, which is incredible. Select your connection type, in my case the WiFi protocol.

After setting up the introduction steps, you should have an empty dashboard as in the below left screenshot. The first thing you need to do is to get into the project settings in order to receive the Authorization token. You can easily send it by email or copy to clipboard. Get it and paste it into the Arduino sketch as I told you in the first steps.

Once you uploaded the sketch into your development board with the proper Authorization Token, you can now start dragging widgets from the Widget Box. You can see in the widget list also information about your remaining energy balance, and also access more by pressing the Add button. In the list, every widget as a short description in the right, but in order to get more information you should check the documentation on the blynk official website. In order to keep this project simple we will start with a button. Drag a Button widget on your dashboard and then click it in order to configure.

The most important setting is to choose the PIN you want to control with that button. For this example we will select the GPIO5 pin from the ESP8266 – ESP12F which is also PWM. You have also the possibility to make it a PUSH Button or a SWITCH. Being a PWM GPIO we are able to scale the values on both states.

After setting up the Button just come back to the dashboard editor screen and you should see it as in the below left image. Now we need to be sure that we powered up our development board and it is in the normal BOOT mode (depending on your device). Once we did that, just hit the little green play button and your project will start running. After that, by pressing the chip like button, you will see if your device is online. If everything is correctly done, you should see exactly like in the images below. Now you can control your GPIO5 by pressing the dashboard button from whatever place in the world.

Once you’ve done your first widget functional, just repeat the process for every available GPIO that you want to control. Off course, as I told you, this is pretty rudimentary, the Blynk framework can do much complex tasks, but I will cover that in next articles. Also, if you want to build more complex projects with Blynk, like reading sensors or making graphs and bridges you will need to do some programming.

Conclusion

In my opinion you, at this moment, you won’t be able to make truly customized IoT projects without being able to at least understand a bit of Arduino / C++ code, or have an algorithmic sense of thinking. But, I am 100% convinced that in the future low level programming will remain only for experts, and friendly frameworks will take the lead, as they already did in biggest companies. The compromise between programming from scratch and building with frameworks will be always the price. Frameworks need people to support and update them and that is expensive. If you want to develop a home automation in short time using benefits of IoT, the Blynk platform is just perfect, I can recommend it without blinking :).

Hoping that this article inspired you, i kindly invite you sharethis article, subscribe my YouTube channel and join the communities on social networks. Please feel free to comment or send suggestions / remarks so i can improve the content quality

8 Replies to “Internet of Things for non-programmers with Arduino, Blynk and ESP8266-12F”

Thank you for all content on your site. It’s helping me a lot, I’m starting my IoT project, just waiting for my ESP8266 12-E module to arrive. I am Brazilian, but with the help of google translator I am reading several articles of yours. The world needs more people like you!
Muito obrigado! –> (In Portuguese)