Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2019
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. int run;
  2. int buttonPin;
  3. int x = 500;
  4.  
  5. neplatné nastavení () {
  6. běh = 0;
  7. buttonPin = 4;
  8. pinMode (buttonPin, INPUT_PULLUP);
  9. pinMode (2, VÝSTUP);
  10. pinMode (3, VÝSTUP);
  11. digitalWrite (2, LOW);
  12. digitalWrite (3, LOW);
  13. }
  14. prázdná smyčka ()
  15. {
  16.  
  17. if (digitalRead (buttonPin) == LOW)
  18. {
  19. if (run == 0)
  20. {
  21. běh = 255;
  22. }
  23. jiný
  24. {
  25. běh = 0;
  26. }
  27. }
  28.  
  29. if (run> 0)
  30. {
  31. pro (int j = 0; j <3000; j ++) {
  32.  
  33. pro (int i = 0; i <5; i ++) {
  34. digitalWrite (3, LOW);
  35. delayMicroseconds (x);
  36. digitalWrite (3, HIGH);
  37. // delayMicroseconds (x);
  38. }
  39. pokud (x> 150) x--; //
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement