Need help coding an audrino with leds.
I am trying to basically make chaser lights. However I want to control the number of off leds between them.
I can seem to only get one set of leds to chase or get multiple segments to light but not chase. Oh and the lights start in the middle of the strip and run out to the ends.
Can anyone help?

· · Web · 1 · 0 · 0

@omnipotens Are these neopixels? I've been using them a bit recently and could take a look

@gbrnt yes, i am 3d printing a tng warp core about 6 foot tall. I am using a esp8266. The idea is to be able to send var to the board via my home auto to control delay and distance between lights to make the appearance of it running faster like at high warp. They also have to split to have both sides go into center.I can upload what I have to github.

@omnipotens I can't guarantee I'll find your issue but I can give it a go!


Question at line 99 what would be the best way to instead of having lights chasing to the end of the string but have both end chase to the middle or better yet set pixel? any thoughts?

@omnipotens Ok I get what you want to do. I'm going to need to get out a longer neopixel strip to figure out what the code is currently doing.

What's the distance parameter supposed to be for? Distance between sets of pulses, or distance between pulses?

@omnipotens I think for getting both ends chasing to the middle I'd usually do something like:

for (blah=blah; blah<blah; blah++) {
strip[blah] = whatever colour;
strip[length-blah] = the same colour;

Obviously it's not that easy if you want the convergence point to be somewhere other than the centre. Maybe find the distance from that point and use it to calculate the brightness it should be?

Sign in to participate in the conversation

Linux Geeks doing what Linux Geeks do..