Nahrát soubory do „08“

This commit is contained in:
2020-01-07 14:42:35 +01:00
parent c1415a91c5
commit 1adefcdc4b
2 changed files with 27 additions and 0 deletions
+27
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);
}
}
Binary file not shown.