Signed in as:
filler@godaddy.com
Signed in as:
filler@godaddy.com
Sample sequence to show all the LEDs turning on one at a time.
See code below gallery.
You can purchase below, or from our Etsy store:
https://www.etsy.com/uk/listing/1363045330/arduino-led-array-for-testing-io
/*
*
* Based on the following Arduino For Loop Iteration example:
*
For Loop Iteration
Demonstrates the use of a for() loop.
Lights multiple LEDs in sequence, then in reverse.
The circuit:
- LEDs from pins 0 through 13 to ground
created 2006
by David A. Mellis
modified 30 Aug 2011
by Tom Igoe
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/ForLoopIteration
*/
int timer = 100; // The higher the number, the slower the timing.
void setup() {
// use a for loop to initialize each pin as an output:
for (int thisPin = 0; thisPin <= 13; thisPin++) {
pinMode(thisPin, OUTPUT);
}
}
void loop() {
// loop from the lowest pin to the highest:
for (int thisPin = 0; thisPin < 13; thisPin++) {
// turn the pin on:
digitalWrite(thisPin, HIGH);
delay(timer);
// turn the pin off:
digitalWrite(thisPin, LOW);
}
// loop from the highest pin to the lowest:
for (int thisPin = 13; thisPin > 0; thisPin--) {
// turn the pin on:
digitalWrite(thisPin, HIGH);
delay(timer);
// turn the pin off:
digitalWrite(thisPin, LOW);
}
}