I was hoping someone could get me on the right path for this or at least the correct terminology for the effect im looking for so i can more properly research it. I am incredibly new to arduino use and more so the programming
My goal is to use a strand of rgb led (hopefully via a trinket) with a "wave" to it if you will. Essentially if i had a whole strand set to a blue tone and would want a section of white to run through the strand on a loop. So the white section would move being replaced by blue or even staying white. Attached is a illustration of what im trying to say.
If anyone knows the term for this effect or could point me in the right direction to research it that would be greatly appreciated.
Simple.
First of all write a function that sets all the LEDs blue.
Next write a function that sets N LEDs to your white shade, starting at a number M passed to it.
Then to create your wave have a for loop that goes from zero to the number of LEDs minus N. In it call the blue setting function, followed by your other function passing it the loop index. At the end of the loop ( but still inside it )call the show method and follow it by a short delay.
To try to answer your question about terminology: if you look at what each led is doing in isolation, they are fading between two colours (e.g. blue and white). This fading could be one-shot or cyclical. The nature of the fade itself could be linear, exponential, logarithmic, sinusoidal and so on.
To create a wave effect, all the LEDs do the same thing, but each led is at a slightly different phase angle from its neighbours. The difference between neighbouring LEDs determines the wavelength.
Ive also found a similar setup on the learn section of the arduino site so ill compare these thoughts with the annotations on the learns provided code and see what i can come up with.
Do it step by step.
First write the function to set all the LEDs to blue. Test this, that is write a setup and loop function to make it work.
Then add to this using other functions. It is very rare that you can write code straight off without building it up first.
I havnt written code since learning Actionscript 2/3 back in college a decade ago.... so ya one step at a time is key but i do see where your coming from and that makes sense.
first step get the RGB values set properly and the strand to accept them and light up once powered
next id work on establishing values per the number of lights and having a set of these shift to a "white" than work towards a loop function which would shift the grouping of "white" lights based on the value
or thats how im seeing it for now... ill have to dive into it and try from bare bones