Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int run;
- int buttonPin;
- int x = 500;
- neplatné nastavení () {
- běh = 0;
- buttonPin = 4;
- pinMode (buttonPin, INPUT_PULLUP);
- pinMode (2, VÝSTUP);
- pinMode (3, VÝSTUP);
- digitalWrite (2, LOW);
- digitalWrite (3, LOW);
- }
- prázdná smyčka ()
- {
- if (digitalRead (buttonPin) == LOW)
- {
- if (run == 0)
- {
- běh = 255;
- }
- jiný
- {
- běh = 0;
- }
- }
- if (run> 0)
- {
- pro (int j = 0; j <3000; j ++) {
- pro (int i = 0; i <5; i ++) {
- digitalWrite (3, LOW);
- delayMicroseconds (x);
- digitalWrite (3, HIGH);
- // delayMicroseconds (x);
- }
- pokud (x> 150) x--; //
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement