Need help with a short and simple yet confussing (atleast to me) piece of code.
I had to write this out line by line on pastebin since i wont see my laptop for another 10 hours. But this is what i have so far for a single line showing up whenever i push a button. As it is right now it will start over if i push the button again while the line is still moving. What i want is for it to start a new line while the other line completes its course so if i only press the button once only 1 line shows up but if i hit the button more than once more lines will show up and do a full run down the strip. Any help is appreciated!
Sounds like you need to add code that will keep track of the LED’s position each time you push the button. Right now you’re resetting the position of the LED each time the button is pressed because the position is not being held when the button is pressed again.
One way you might do this is each time you press the button it sets the location to an array of integers and then the loop to display the LED checks each member of the array and sets that position on. You’ll also have to increment the positions as they move.
Jason’s color pulse (from the video) looks like it’s doing something similar to what you’re asking for and has similar code to what I was describing. Very nice project Jason!
@Cristian_Martinez I have been at it for years, and it’s what I do for a living. I’m still learning and hope to never stop! It definitely takes a lot of time and patience. Read and try to understand all of the code you find, especially the FastLED code and examples from Daniel and Mark! Start with DemoReel100. Don’t stop until you understand every single line.