Esp8266 nodemcu + ide arduino, controlar un servomotor

The project consists of controlling a servomotor using ** Only a Blynk BUTTON ** that connected to the ESP8266 NODEMCU activates the Servomotor from 0 to 180 degrees and after 5 seconds returning from 180 to 0 degrees.

It is the first time you use the ESP8266, and it cannot be used to apply automatic closing after 5 seconds of pressing the button.

What should I do so that my current programming works with a single button and the servo automatically returns after 5 seconds.

This is my current program.

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <Servo.h>

char auth[] = "qxVlIzxoGj9E7yVkfIWpQdMYuT7FX-ZS";
char ssid[] = "ARRIS-1E42";
char pass[] = "99CA7C7B3720ACAC";

Servo servo;
void setup()
  Blynk.begin(auth, ssid, pass);
void loop()

@Fabrizio056 please edit your post (using the pencil icon at the bottom of the post) and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:


1 Like

I think now I corrected the post.

Search the forum for examples of how to use timeout timers.