#include <Servo.h>
Servo servo;
int tlacitko = D6;
int sensor = D8; 
void setup() {
  pinMode(tlacitko, INPUT_PULLUP);
  pinMode(sensor, INPUT);
  servo.attach(2);
  servo.write(0);
  delay(2000);
  

}



void loop() {
  long stav = digitalRead(sensor);
  if(stav == LOW)
    { 
    servo.write(90);
    delay(10000);
    servo.write(0);
    delay(500);
    }
   
}