Advertisement
roodeebee

Arduino Cop Blink

Mar 26th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.81 KB | None | 0 0
  1. /*
  2. Blink Cop
  3. This code was modified from the public "Blink" script by Rudy Boyer.
  4.  
  5. */
  6.  
  7. void setup() {
  8. // initialize the digital pin as an output.
  9. // Pin 9 LED1 Red
  10. // Pin 10 LED1 Blue
  11. // Pin 11 LED2 Red
  12. // Pin 12 LED2 Blue
  13. pinMode(9, OUTPUT);
  14. pinMode(10, OUTPUT);
  15. pinMode(11, OUTPUT);
  16. pinMode(12, OUTPUT);
  17. }
  18.  
  19. void loop() {
  20. digitalWrite(12, HIGH); // LED2 Blue ON
  21. delay(60); // wait
  22. digitalWrite(12, LOW); // LED2 Blue OFF
  23. delay(30); // wait
  24. digitalWrite(11, HIGH); // LED2 Red ON
  25. delay(60); // wait
  26. digitalWrite(11, LOW); // LED2 Red OFF
  27. delay(30); // wait
  28. digitalWrite(12, HIGH); // LED2 Blue ON
  29. delay(60); // wait
  30. digitalWrite(12, LOW); // LED2 Blue OFF
  31. delay(30); // wait
  32. digitalWrite(11, HIGH); // LED2 Red ON
  33. delay(60); // wait
  34. digitalWrite(11, LOW); // LED2 Red OFF
  35. delay(30); // wait
  36.  
  37. digitalWrite(10, HIGH); // LED1 Blue ON
  38. delay(60); // wait
  39. digitalWrite(10, LOW); // LED1 Blue OFF
  40. delay(30); // wait
  41. digitalWrite(9, HIGH); // LED1 Red ON
  42. delay(60); // wait
  43. digitalWrite(9, LOW); // LED1 Red OFF
  44. delay(30); // wait
  45. digitalWrite(10, HIGH); // LED1 Blue ON
  46. delay(60); // wait
  47. digitalWrite(10, LOW); // LED1 Blue OFF
  48. delay(30); // wait
  49. digitalWrite(9, HIGH); // LED1 Red ON
  50. delay(60); // wait
  51. digitalWrite(9, LOW); // LED1 Red OFF
  52. delay(30); // wait
  53.  
  54. digitalWrite(12, HIGH); // LED2 Blue ON
  55. delay(60); // wait
  56. digitalWrite(12, LOW); // LED2 Blue OFF
  57. delay(30); // wait
  58. digitalWrite(11, HIGH); // LED2 Red ON
  59. delay(60); // wait
  60. digitalWrite(11, LOW); // LED2 Red OFF
  61. delay(30); // wait
  62. digitalWrite(12, HIGH); // LED2 Blue ON
  63. delay(60); // wait
  64. digitalWrite(12, LOW); // LED2 Blue OFF
  65. delay(30); // wait
  66. digitalWrite(11, HIGH); // LED2 Red ON
  67. delay(60); // wait
  68. digitalWrite(11, LOW); // LED2 Red OFF
  69. delay(30); // wait
  70.  
  71. digitalWrite(10, HIGH); // LED1 Blue ON
  72. delay(60); // wait
  73. digitalWrite(10, LOW); // LED1 Blue OFF
  74. delay(30); // wait
  75. digitalWrite(9, HIGH); // LED1 Red ON
  76. delay(60); // wait
  77. digitalWrite(9, LOW); // LED1 Red OFF
  78. delay(30); // wait
  79. digitalWrite(10, HIGH); // LED1 Blue ON
  80. delay(60); // wait
  81. digitalWrite(10, LOW); // LED1 Blue OFF
  82. delay(30); // wait
  83. digitalWrite(9, HIGH); // LED1 Red ON
  84. delay(60); // wait
  85. digitalWrite(9, LOW); // LED1 Red OFF
  86. delay(30); // wait
  87.  
  88. digitalWrite(12, HIGH); // LED2 Blue ON
  89. delay(150); // wait
  90. digitalWrite(12, LOW); // LED2 Blue OFF
  91. delay(30); // wait
  92. digitalWrite(9, HIGH); // LED1 Red ON
  93. delay(150); // wait
  94. digitalWrite(9, LOW); // LED1 Red OFF
  95. delay(30); // wait
  96. digitalWrite(12, HIGH); // LED2 Blue ON
  97. delay(150); // wait
  98. digitalWrite(12, LOW); // LED2 Blue OFF
  99. delay(30); // wait
  100. digitalWrite(9, HIGH); // LED1 Red ON
  101. delay(150); // wait
  102. digitalWrite(9, LOW); // LED1 Red OFF
  103. delay(30); // wait
  104. digitalWrite(12, HIGH); // LED2 Blue ON
  105. delay(150); // wait
  106. digitalWrite(12, LOW); // LED2 Blue OFF
  107. delay(30); // wait
  108. digitalWrite(9, HIGH); // LED1 Red ON
  109. delay(150); // wait
  110. digitalWrite(9, LOW); // LED1 Red OFF
  111. delay(30); // wait
  112.  
  113. digitalWrite(12, HIGH); // LED2 Blue ON
  114. digitalWrite(9, HIGH); // LED1 Red ON
  115. delay(150); // wait
  116. digitalWrite(12, LOW); // LED2 Blue OFF
  117. digitalWrite(9, LOW); // LED1 Red OFF
  118. delay(150); // wait
  119.  
  120. digitalWrite(11, HIGH); // LED2 Red ON
  121. digitalWrite(10, HIGH); // LED1 Blue ON
  122. delay(150); // wait
  123. digitalWrite(11, LOW); // LED2 Red OFF
  124. digitalWrite(10, LOW); // LED1 Blue OFF
  125. delay(150); // wait
  126.  
  127. digitalWrite(12, HIGH); // LED2 Blue ON
  128. digitalWrite(9, HIGH); // LED1 Red ON
  129. delay(150); // wait
  130. digitalWrite(12, LOW); // LED2 Blue OFF
  131. digitalWrite(9, LOW); // LED1 Red OFF
  132. delay(150); // wait
  133.  
  134. digitalWrite(11, HIGH); // LED2 Red ON
  135. digitalWrite(10, HIGH); // LED1 Blue ON
  136. delay(150); // wait
  137. digitalWrite(11, LOW); // LED2 Red OFF
  138. digitalWrite(10, LOW); // LED1 Blue OFF
  139. delay(150); // wait
  140. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement