Code
I don’t expect any of this to make sense because it is a combination of my language and what I think the language of Arduino is.
Code is starting to come together. I have managed to manipulate a code for pulsing in a way that will cater to parts of another code in a way that will likely emulate its function. How did I get here. First I dug through a lot of different codes that allowed me to make a single LED pulse on and off at different intervals. At first this involved one variable in the form of a delay() command. This is a good path for allowing a single process to happen. I need multiple delay() layers. In the code a number is entered into the parentheses and the delay takes effect based on where it is located in the code. The below video is an example of code working properly on one LED of a strip. This LED can be changed to display in any of the LEDs on the strip but only one at a time as writin.
At this point I ran into major problems getting the code to express on all eight LEDs. First I had to insert a line that would prompt all eight LEDs. This involved learning how to articulate a constant and declare said constant as a phrase that would relate to the number of pixels on a strip. Success and failure both occurred next. While I was able to get the entire strip to light, the delay effect was passed on from one pixel to the next and the pulsing effect is never really visible. The video bleow displays this successful failure.
My solution was to work with a more complex code that allows the delay to be independent of the show and specific to the loop that it is tied to. This allows me to edit the delay involved in display of the entire strip of LEDs rather than one at a time. This comes about through a combination of a button cycler code and a pulse code where I create a series of events based on void loops that each have independent abilities. I imagine that my final code will be much more complex version of this. The trick will be learning ow to get two strips of lens to oporate with two different pulse durations. I have learned to write the code for simple LEDs but have not tried for smart pixels. The below video displays a group of three slow pulses, red green, and blue, followed by a set of quicker yellow, aqua, and purple pulses.
Reader Comments