kartonman

Arc welder that runs continuosly

Sep 13th, 2021 (edited)
143
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*Arc welder that runs continuously
  2.  
  3. #define ledPin 5 // LED connected to digital pin 5
  4. #define ledPin2 6 // LED connected to digital pin 6
  5.  
  6.  
  7. void setup()
  8. { pinMode(ledPin, OUTPUT);
  9. pinMode(ledPin2, OUTPUT);
  10.  
  11. }
  12.  
  13. void loop()
  14. {
  15. int i,count;
  16. count=random(10,60);
  17. for (i=0;i<count;i++) {
  18. digitalWrite(ledPin, HIGH); // set the LED on
  19. delay(random(60));
  20. digitalWrite(ledPin2, HIGH); // set the LED on
  21. delay(random(80));
  22.  
  23.  
  24. digitalWrite(ledPin, LOW); // set the LED off
  25. delay(random(200));
  26. digitalWrite(ledPin2, LOW); // set the LED off
  27. delay(random(100));
  28. }
  29.  
  30. delay(random(800,2000));
  31. }
RAW Paste Data Copied