Advertisement
Hadlock

deadite-signblink.ino

Sep 20th, 2023
1,101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.12 KB | Source Code | 0 0
  1. #include <ezOutput.h> // ezOutput library
  2.  
  3. int pinOut0 = 0;
  4. ezOutput output1(1);  // create ezOutput object that attach to pin 1;
  5. ezOutput output2(2);  // create ezOutput object that attach to pin 2;
  6. ezOutput output3(3);  // create ezOutput object that attach to pin 3;
  7. ezOutput output4(4);  // create ezOutput object that attach to pin 4;
  8. ezOutput output5(5);  // create ezOutput object that attach to pin 5;
  9. ezOutput output6(6);  // create ezOutput object that attach to pin 6;
  10. ezOutput output7(7);  // create ezOutput object that attach to pin 7;
  11. ezOutput output8(8);  // create ezOutput object that attach to pin 8;
  12. ezOutput output9(9);  // create ezOutput object that attach to pin 9;
  13. ezOutput output10(10);  // create ezOutput object that attach to pin 10;
  14. ezOutput output11(11);  // create ezOutput object that attach to pin 11;
  15. ezOutput output12(12);  // create ezOutput object that attach to pin 12;
  16. ezOutput output13(13);  // create ezOutput object that attach to pin 13;
  17.  
  18. void setup() {
  19.   output1.blink(1000, 1000); // 1 seconds ON, 1 seconds OFF
  20.   output2.blink(2000, 2000); // 2 seconds ON, 2 seconds OFF
  21.   output3.blink(3000, 3000); // 3 seconds ON, 3 seconds OFF
  22.   output4.blink(4000, 4000); // etc
  23.   output5.blink(5000, 5000);
  24.   output6.blink(6000, 6000);
  25.   output7.blink(7000, 7000);
  26.   output8.blink(8000, 8000);
  27.   output9.blink(9000, 9000);
  28.   output10.blink(10000, 10000); // 10 seconds ON, 10 seconds OFF
  29.   // fractional seconds blink
  30.   output11.blink(250, 250); // 1/4 seconds ON, 1/4 seconds OFF
  31.   output12.blink(500, 500); // 1/2 seconds ON, 1/2 seconds OFF
  32.   output13.blink(7500, 750); // 3/4 seconds ON, 3/4 seconds OFF
  33. }
  34.  
  35. void loop() {
  36.   digitalWrite(pinOut0, HIGH); // pin 0 always ON
  37.   output1.loop(); // blink 1 second
  38.   output2.loop(); // blink 2 second
  39.   output3.loop(); // blink 3 second
  40.   output4.loop(); // etc
  41.   output5.loop();
  42.   output6.loop();
  43.   output7.loop();
  44.   output8.loop();
  45.   output9.loop();
  46.   output10.loop(); // blink 10 second
  47.   // fractional seconds blink
  48.   output11.loop(); // blink 1/4 second
  49.   output12.loop(); // blink 1/2 second
  50.   output13.loop(); // blink 3/4 second
  51. }
Tags: Arduino Blink
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement