Advertisement
TrixTec

Arduino Blink

Aug 27th, 2017
3,422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {
  2. pinMode(1, OUTPUT); //Tells the arduino that something is here
  3. pinMode(2, OUTPUT);
  4. pinMode(3, OUTPUT);
  5.  
  6. }
  7.  
  8. void loop() {
  9. digitalWrite(1, HIGH); //HIGH=Power On
  10. digitalWrite(2, LOW); //LOW=Power OFF
  11. digitalWrite(3, LOW);
  12. delay(500);
  13. digitalWrite(1, LOW);
  14. digitalWrite(2, HIGH);
  15. digitalWrite(3, LOW);
  16. delay(500);
  17. digitalWrite(1, LOW);
  18. digitalWrite(2, LOW);
  19. digitalWrite(3, HIGH);
  20. delay(500);
  21. digitalWrite(1, HIGH);
  22. digitalWrite(2, HIGH);
  23. digitalWrite(3, HIGH);
  24. delay(500);
  25. digitalWrite(1, LOW);
  26. digitalWrite(2, LOW);
  27. digitalWrite(3, LOW);
  28. delay(500);
  29.  
  30.  
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement