Servo Control With NodeMCU and Blynk | in IOT Platform

About: I am Sarful , I am a Mechatronics Engineer & also a teacher in Rajshahi Polytechnics Institute I am Interested in the evolution of technology in the automation industry , and i aspire to teach this techn...

In this tutorial you can control your servo using Blynk app in IOT Platform

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1:

In this tutorial you can control your servo using Blynk app in IOT Platform

In this project you have to need Hardware

1. Nodemcu


3.connection ware


1. Ardunio

2. Blynk App

This tutorial i divided into 4 Part

Part 1: NodeMCU insulation with wifi name and password

char ssid [] = "Your WIFI name";

char pass [] = "Password ";

Explain: Include the Wifi library and wifi name and password that you went to be use for internet

Part 2: Blynk App Option


#define BLYNK_PRINT Serial

char auth [] = "yourAuthkey ";

Explain: Include the blynk app library and reflex your auth key from you gmail

Part 3: Servo operation

#include servo.h

Servo servo1;

#define servo1Pin D2

Explain: Include the servo library and Create the Servo and name it "servo1" and Define the NodeMCU pin to attach the Servo


Explain: NodeMCU (A0) from 0 to 3.3V. Internally, the 10 bits ADC (Analog-Digital converter) will generate a digital value (from 0 to 1023),

servo1Angle = map(PotReading, 0, 1023, 0, 180);

Explain: We should "map" this digital value, in order that the Pulse Width Modulated (PWM) digital output of pin D2, will vary from 0 to 180 (servo1Angle). and With this signal, the servo will turn from 0 to 180 degree, using the bellow command.

Step 2: Part 4: Creating a Blynk App to Control the Servo Flowing Image

Step 3:

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest