Facebook
From hgfhf, 8 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 413
  1. void setup() {
  2.   // put your setup code here, to run once:
  3.   int red=3;
  4.   int yellow=6;
  5.   int green=8;
  6.   pinMode(red, OUTPUT); //red
  7.   pinMode(yellow, OUTPUT); //yellow
  8.   pinMode(green, OUTPUT); //green
  9.  
  10. }
  11.  
  12. void loop() {
  13.   // put your main code here, to run repeatedly:
  14. int red=3;
  15. int yellow=6;
  16. int green=8;
  17. digitalWrite(red, HIGH);
  18. delay(5000);
  19. digitalWrite(red, LOW);
  20. delay(1000);
  21. digitalWrite(yellow, HIGH);
  22. delay(500);
  23. digitalWrite(yellow, LOW);
  24. delay(500);
  25. digitalWrite(yellow, HIGH);
  26. delay(500);
  27. digitalWrite(yellow, LOW);
  28. delay(500);
  29. digitalWrite(yellow, HIGH);
  30. delay(500);
  31. digitalWrite(yellow, LOW);
  32. delay(500);
  33. digitalWrite(green, HIGH);
  34. delay(4000);
  35. digitalWrite(green, LOW);
  36. delay(1000);
  37.  
  38. }