Hello,
My first thread
I'm working on a project in which there are around 40 to 45 LED s. This project is similar to a dancing LED project with Arduino projects. But What I want to do is that I want to define a unique delay time for each LED.
For a better illustration, assume the code below :
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
when it starts, led gets on , then it waits for 1 second and after that the led gets off. and the cycle repeats. Whatever code you write above delay(1000); gets operated and then it encounters the delay.
What if I want to do this with +40 LED s with different timing and delays ? I don't want to apply one delay time for all the LED s at any moment of running the code. I think I should do the trick using different threads for LED s , as each code for a single led gets operated independently from other LED s . but all the operation should go on parallelly.
What Arduino board is Suitable for this ? Does the processing speed or ability of the boards matter in this case ?
I would appreciate any help and suggestion.