Automate window blinds

Hi Everybody,

I am new to working with arduino and I am in need of your help.

I am trying to automate my windows blinds and the tools which I am trying to accomplish this task is:

  1. Blynk mobile App
  2. NodeMCU
  3. 360 degree continous servo motor (Luxorparts Servo 360° 5,5 kg - Modell nr: DS04-NFC)
  4. IFTTT
  5. Google home

I have so far got it to work with the blynk app so that I can controll the servo, but the challenge I am facing right now is that I don't know how to have the servo to spin for lets say 10 seconds and then hold that position.

I have searched all over the web but can't seem to find anything that could point me in the right direction.

Any help is highly appreciated.

here's the code:

/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>

#include <BlynkSimpleEsp8266.h>

#include <Servo.h>

// You should get Auth Token in the Blynk App.

// Go to the Project Settings (nut icon).

char auth[] = "Blynk authentication code";

// Your WiFi credentials.

// Set password to "" for open networks.

char ssid[] = "name of wifi network";

char pass[] = "wify password!";

Servo servo;

BLYNK_WRITE(V3) {

servo.write(param.asInt());

}

void setup() {

// Debug console Serial.begin(115200);

Blynk.begin(auth, ssid, pass);

// You can also specify server:

//Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);

//Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);

servo.attach(15); // 15 means D8 pin of ESP8266

}

void loop()

{

Blynk.run(); // You can inject your own code or combine it with other sketches.

}

Please understand I am totally new, and the code above is not something I have put together by myself, a kind sole shared that.

Thank you

when a pulse of 1500 μS width is given, the servo shaft holds position at 0 degrees without moving. A CR servo in a neutral position will hold shaft stationary. When the pulse width is reduced from the neutral position, (say 1400 μS ) the shaft starts to rotate in anti-clockwise direction.