Adresářová struktura pro odevzdání soutěžních úloh.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 satır
355B

  1. #include <Servo.h>
  2. Servo servo;
  3. int tlacitko = D6;
  4. void setup() {
  5. pinMode(tlacitko, INPUT_PULLUP);
  6. servo.attach(2); //D4
  7. servo.write(0);
  8. delay(2000);
  9. }
  10. void loop() {
  11. int energie = digitalRead(tlacitko);
  12. if(energie == false)
  13. {
  14. delay(1000);
  15. servo.write(90);
  16. delay(10000);
  17. servo.write(0);
  18. }
  19. }