Created
September 20, 2023 23:21
-
-
Save Hadlock/dc3c4f5d5a23176abbd8bfb90ceba5d3 to your computer and use it in GitHub Desktop.
blink gist for arduino for LED sign with arduino relay controller 5v logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ezOutput.h> // ezOutput library | |
int pinOut0 = 0; | |
ezOutput output1(1); // create ezOutput object that attach to pin 1; | |
ezOutput output2(2); // create ezOutput object that attach to pin 2; | |
ezOutput output3(3); // create ezOutput object that attach to pin 3; | |
ezOutput output4(4); // create ezOutput object that attach to pin 4; | |
ezOutput output5(5); // create ezOutput object that attach to pin 5; | |
ezOutput output6(6); // create ezOutput object that attach to pin 6; | |
ezOutput output7(7); // create ezOutput object that attach to pin 7; | |
ezOutput output8(8); // create ezOutput object that attach to pin 8; | |
ezOutput output9(9); // create ezOutput object that attach to pin 9; | |
ezOutput output10(10); // create ezOutput object that attach to pin 10; | |
ezOutput output11(11); // create ezOutput object that attach to pin 11; | |
ezOutput output12(12); // create ezOutput object that attach to pin 12; | |
ezOutput output13(13); // create ezOutput object that attach to pin 13; | |
void setup() { | |
output1.blink(1000, 1000); // 1 seconds ON, 1 seconds OFF | |
output2.blink(2000, 2000); // 2 seconds ON, 2 seconds OFF | |
output3.blink(3000, 3000); // 3 seconds ON, 3 seconds OFF | |
output4.blink(4000, 4000); // etc | |
output5.blink(5000, 5000); | |
output6.blink(6000, 6000); | |
output7.blink(7000, 7000); | |
output8.blink(8000, 8000); | |
output9.blink(9000, 9000); | |
output10.blink(10000, 10000); // 10 seconds ON, 10 seconds OFF | |
// fractional seconds blink | |
output11.blink(250, 250); // 1/4 seconds ON, 1/4 seconds OFF | |
output12.blink(500, 500); // 1/2 seconds ON, 1/2 seconds OFF | |
output13.blink(7500, 750); // 3/4 seconds ON, 3/4 seconds OFF | |
} | |
void loop() { | |
digitalWrite(pinOut0, HIGH); // pin 0 always ON | |
output1.loop(); // blink 1 second | |
output2.loop(); // blink 2 second | |
output3.loop(); // blink 3 second | |
output4.loop(); // etc | |
output5.loop(); | |
output6.loop(); | |
output7.loop(); | |
output8.loop(); | |
output9.loop(); | |
output10.loop(); // blink 10 second | |
// fractional seconds blink | |
output11.loop(); // blink 1/4 second | |
output12.loop(); // blink 1/2 second | |
output13.loop(); // blink 3/4 second | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment