January 09, 2021

IoT Using Blynk - Blinking LED Widget

We already blinked the built-in LED of NodeMCU. We have also discussed the Blynk App, how to install and set it up. Now we will go for the Led of Blynk app. These Widgets act as virtual hardware. Our Aim is to blink the Virtual LED with the actual LED in NodeMCU.

If you are new then follow the Step by Step Blynk Installation Guide to install the Blynk app on your phone. If you are using NodeMCU for the first time then you have to add NodeMCU to your Arduino IDE. Please follow the step-by-step tutorial for Programming NodeMCU Step by Step Using Arduino IDE.

In our last blog, we got a mail from Blynk which has Auth Token. This Auth Token is a unique identifier that is particularly dedicated to a controller or hardwire. Think of it as your identity number of the NodeMCU. With this ID number, Blynk identifies your controller and differentiates it from all other controllers that are running by others all around the globe.

For this project, we will only need 

  • NodeMCU 

  •  Blynk App Installed in a Android Phone 

Step 1: Open Arduino IDE.



Step 2: Copy-Paste the code there.


Step 3: Copy the Auth-Code that is sent to your mail-id. Just delete YourAuthToken and paste your auth code there. Then delete YourNetworkName and write your WiFi router or phones hotspot name there. Finally, delete YourPassword and put your Wi-Fi or hotspot password.

Step 4: Click on Tools and make sure that you have selected the right device and the right port. For me its NodeMCU and COM11. (For you it may not be COM11 so check before uploading)

Step 5: Finally, save the code and hit the upload button. 

Then go to the settings of the LED Widget. You can do it by tapping on the LED widget. Set V1 as the Input.


Video: IoT Using NodeMCU and Blynk

Source Code:




January 08, 2021

Blynk

Blynk is a free IoT platform. Let's set up Blynk step by step.

Step 1: Open play store, search for the app Blynk and install the app.


Step 2: Install the app in your device.

Step 3: Find the app icon looks like the one shown below. Then open it.

Step 4: If you have an account log in otherwise click on Create New Account. You can log in using your Facebook account also.

Step 5: Enter your email id and then create a password and enter it. Note that this is not your email id's password. You have to create a different password.

Step 6: Click Sign Up

Step 7: Read the note and Click on Cool! Got it. This service is not totally free but partially free. We will discuss it later.

Step 8: Now its time to make a new project. Click on New Project.

Step 9: Click Project Name to edit it and give it a new name.

Step 10: In my case, I've chosen Test Project.

Step 11: Then Click the drop-down menu and find the controller you are using and select OK. In my case, I have chosen NodeMCU because in my last blog was about programming NodeMCU.

Step 12: Select Connection Type as Wi-Fi and click Create.

Step 13: Click ok and find the Auth token from your email id. We will discuss this Auth Token and how to use it in our next blog. 


Step 14: This is a blank project. Now you have to add some widgets. Now, these widgets are not free. You get only 2000 Units of energy and this energy you have spent to get a widget. The declaration in Step 7 was about this.

Step 15: There are various types of widgets and all have prise. So choose your weapon wisely.

I'll discuss some of these widgets later in another blog.