Hello everybody! I'm new here and I have searched for a long time trying to figure out how to do this. I may not be looking for the right words, but basically here's what I want to do:
LED Strip - Solid Red the whole strip for 3 seconds, flash to a very very light blue (almost white) for about a half a second, back to red for about a half a second, back to the light blue/white for a half a second, and repeat.
I have figured out how to make each LED a certain color, but I can't figure out how to make it jump to another one.
So heres what I'm asking:
How would I go about making a code for what I want to do?
What sort of LED strip have you got? Are the LEDs individually addressable?
To make it jump from one to the other simply follow the instructions for one colour with a delay and then put the instructions for the second colour followed by a delay.
It is just like the blink LED example only setting the colours you want instead of turning a digigital pin alternately high and low.
Hi! OK so I got it to do exactly what I want, but its doing it on just one pixel. I know why, I can see what the code is saying, but how would I select all 300 at once rather than typing it all in individually?
Here's the code:
You would use a for loop to change all the LEDs , so that is one line for the for loop and a second to change the colour. The index of your for loop will be used as the LED number.