mich29800

LAB

Feb 1st, 2020
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // the setup function runs once when you press reset or power the board
  2.  
  3.  
  4. unsigned long temps;
  5.  
  6. void setup() {
  7. // initialize digital pin LED_BUILTIN as an output.
  8. pinMode(6, OUTPUT);
  9. pinMode(9,OUTPUT);
  10. pinMode(10, OUTPUT);
  11. pinMode(11,OUTPUT);
  12. }
  13. // the loop function runs over and over again forever
  14. void loop() {
  15.  
  16. do
  17. {
  18. digitalWrite(6, HIGH);// turn the LED on (HIGH is the voltage level}
  19. delay(25); // wait for a second
  20. digitalWrite(6, LOW); // turn the LED off by making the voltage LOH
  21. delay(30); // wait for a second
  22. digitalWrite(11, HIGH); //turn the LED on {HIGH is the voltage level:
  23. delay(25); // wait for a second
  24. digitalWrite(11, LOW); // turn the LED off by making the voltage LOW
  25. delay(45);
  26. digitalWrite(9, HIGH);// turn the LED on (HIGH is the voltage level)
  27. delay(20); // wait for a second
  28. digitalWrite(9,LOW); // turn the LED oft by making the voltage LOW
  29. delay(30);
  30. digitalWrite(10, HIGH); // turn the LED on {HIGH is the voltage level]
  31. delay(40);  // wait for a second
  32. digitalWrite(10,LOW); // turn the LED ott by making the voltage LOW
  33. delay(80);
  34. }
  35. while ((millis()-temps)<2000);
  36. delay(5000);
  37. temps=millis();
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment