Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Arc welder that runs continuously
- #define ledPin 5 // LED connected to digital pin 5
- #define ledPin2 6 // LED connected to digital pin 6
- void setup()
- { pinMode(ledPin, OUTPUT);
- pinMode(ledPin2, OUTPUT);
- }
- void loop()
- {
- int i,count;
- count=random(10,60);
- for (i=0;i<count;i++) {
- digitalWrite(ledPin, HIGH); // set the LED on
- delay(random(60));
- digitalWrite(ledPin2, HIGH); // set the LED on
- delay(random(80));
- digitalWrite(ledPin, LOW); // set the LED off
- delay(random(200));
- digitalWrite(ledPin2, LOW); // set the LED off
- delay(random(100));
- }
- delay(random(800,2000));
- }
Add Comment
Please, Sign In to add comment