Browse Source

Nahrát soubory do „08“

master
Nela Achillesová 5 years ago
parent
commit
1adefcdc4b
2 changed files with 27 additions and 0 deletions
  1. +27
    -0
      08/source.txt
  2. BIN
      08/video-1576764398.mp4

+ 27
- 0
08/source.txt View File

@@ -0,0 +1,27 @@
#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);
}
}

BIN
08/video-1576764398.mp4 View File


Loading…
Cancel
Save