Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the setup function runs once when you press reset or power the board
- unsigned long temps;
- void setup() {
- // initialize digital pin LED_BUILTIN as an output.
- pinMode(6, OUTPUT);
- pinMode(9,OUTPUT);
- pinMode(10, OUTPUT);
- pinMode(11,OUTPUT);
- }
- // the loop function runs over and over again forever
- void loop() {
- do
- {
- digitalWrite(6, HIGH);// turn the LED on (HIGH is the voltage level}
- delay(25); // wait for a second
- digitalWrite(6, LOW); // turn the LED off by making the voltage LOH
- delay(30); // wait for a second
- digitalWrite(11, HIGH); //turn the LED on {HIGH is the voltage level:
- delay(25); // wait for a second
- digitalWrite(11, LOW); // turn the LED off by making the voltage LOW
- delay(45);
- digitalWrite(9, HIGH);// turn the LED on (HIGH is the voltage level)
- delay(20); // wait for a second
- digitalWrite(9,LOW); // turn the LED oft by making the voltage LOW
- delay(30);
- digitalWrite(10, HIGH); // turn the LED on {HIGH is the voltage level]
- delay(40); // wait for a second
- digitalWrite(10,LOW); // turn the LED ott by making the voltage LOW
- delay(80);
- }
- while ((millis()-temps)<2000);
- delay(5000);
- temps=millis();
- }
Advertisement
Add Comment
Please, Sign In to add comment