Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chase sequence? #31

Open
jschuenke1 opened this issue Oct 30, 2019 · 4 comments
Open

Chase sequence? #31

jschuenke1 opened this issue Oct 30, 2019 · 4 comments

Comments

@jschuenke1
Copy link

Is it possible to create a sequence in a loop where the addressed LED advances? I'd like to start at 0 and pulse LED up/down and then move to LED 1 and pulse up/down, etc to an end point of say 50 LED's.

I need a way to address led 1, then 2, then 3, etc. i don't see how to do this in your commands.

@jschuenke1
Copy link
Author

OK so I see how to address particular LED's using the fill command. Is there a way to make the startLED a parameter so it can be incremented in a do loop?

@tom-2015
Copy link
Owner

not at this moment unfortunately
if you don't have too much LEDs you can just copy/paste I think

@tom-2015
Copy link
Owner

you can do this now with {0} which will be replaced by loop index and extra parameter can be added to the loop = step.

do
     fill 1,FF0000,{0},1
loop 10,2

this is the same as:

for (i=0;i<10;i+=2){
     fill 1,FF0000,i,1
}

if you have a nested loops you can increase the {0} to {1}:

do
    do
          fill 1,FF0000,{1},1
    loop 10,2
loop

To create complicated animations it's better to run the ws2812svr as a system service listening on a TCP port and send commands to it with external program like python,C# or shell script.

Create png files with each pixel the color for the led you want and load them with the readpng command in a loop is another possibility. The newest version can read entire png/jpg files with a delay between rendering each pixel line.

@jschuenke1
Copy link
Author

jschuenke1 commented Dec 30, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants