A production-ready enterprise IoT actuator framework connecting ESP8266 and ESP32 microcontrollers to the Blynk 2.0 Cloud platform, featuring bidirectional Virtual Pin (V0) angle streaming, zero-downtime auto-reconnection state machines, and hardware timer brownout protection.
- Blynk Template Authentication: Connects securely via TLS / encrypted token auth.
- Virtual Pin V0: Mapped to an integer range of
0to180for smooth angle control from the Blynk mobile app or web console. - Non-Blocking Execution: Utilizes
BlynkTimerevent scheduling to ensure steady 50Hz PWM output without blocking network keep-alive packets. - Auto-Reconnect State Machine: Automatically recovers Wi-Fi and cloud connectivity during network dropouts without resetting the hardware position.
| Module / Pin | NodeMCU ESP8266 | ESP32 DevKit | Description |
|---|---|---|---|
| Servo Signal | GPIO 2 (D4) | GPIO 18 | 50Hz PWM Servo Angle Pulse |
| Servo Power (5V) | External 5V 2A Rail | External 5V 2A Rail | Isolated DC power supply |
| Ground (GND) | Common GND | Common GND | Shared common ground |
- Clone repository:
git clone https://github.com/ALWINTR/blynk-servo-controller.git
- Open
blynk_servo_controller.inoin Arduino IDE. - Configure your Blynk 2.0 credentials:
#define BLYNK_TEMPLATE_ID "TMPLxxxxxx" #define BLYNK_DEVICE_NAME "Servo Controller" #define BLYNK_AUTH_TOKEN "YourAuthToken" char ssid[] = "YOUR_WIFI_SSID"; char pass[] = "YOUR_WIFI_PASSWORD";
- Install the Blynk library via Library Manager.
- Upload firmware and control the servo in real time from the Blynk mobile app.
Alwin T R — Robotics & Automation Engineer
- 💼 LinkedIn: linkedin.com/in/alwintr
- 🌌 Portfolio: alwintr.github.io
- 💻 GitHub: github.com/ALWINTR
This project is licensed under the MIT License — see the LICENSE file for details.