Hey guys, I’m new to FastSPI and everything I know about arduino coding I’ve taught myself. I made an infinity mirror and put in some non FastSPI sample code a while ago. Now I’m coming back and writing my own. One particular function i cant figure out is sending a color string of 8 or 9 leds across the mirror and looping back around, with all the others turned off (my problem). I’ve sent 3 blue and 3 hot pink across the mirror clumsily, if anyone wants to see that code: http://pastebin.com/2UCvW2EA
http://www.youtube.com/watch?v=seXmTZ3hYgc
Is the beginning of your video demonstrating the problem you are experiencing?
No, I was just showing what I’ve done with an led string. I would just like to see some sample code I guess. The pastbin link I’ve posted shows how I sent two different color trails through the string. I would like some tips on how to do it better if anyone has time
https://plus.google.com/105445034001275025240/posts/CoJk7o2PTvB
I think this code would be pretty amazing on the mirror as it, but it should show a different way to achieve programming a block of leds.
How did you get the depth to not be straight? Is the front or rear glass not quite flat?
Yeah, the front 2 way mirror is acrylic, not glass, and it shipped to me with a slight curvature. Some people like the effect but i wanted it to be straight. http://imgur.com/a/myOgC
I think it could be really cool if you could control it - perhaps by flexing the rear mirror with an actuator, invisibly.
It would be cool but it’s not possible to do invisibly. I see you’ve made an infinity mirror too, nice! Have you sent a group of leds ‘around’ the mirror with all others not currently on being off (or another color)? I need help with that.
It would be if you did the rear mirror, but you’d have to use a flexible mirror, mine is glass.
I sort of have, actually it’s a rainbow loop which rotates around. I can think of a couple of ways to do what you want, first you should start with say 10 leds on at the start of the LED array, and then move them along one led at a time. You can do this either by shuffling them all down the array (and looping them from the end back to the start), or you could use an offset value. So if offset is 3, then you iterate from 0 to 2 setting the led to black, then iterate for 10 setting the colour you want, then iterate for the rest of the led array size (num_leds - offset - 10) with black.
I got it working, code here: http://pastebin.com/dn4gcp3y
Well done for figuring it out 
It’s possibly a bit longer than it needs to be. I committed my changes to the funkboxing code, which might help (though it’s a big file): https://github.com/joelbyrnes/Arduino/blob/master/LED_WS2811/Demos/Demos.ino
I did something similar to yours, except I also made it symmetrical so it flows both sides down to the bottom point. Look at void xmas_colours_vertical()
Actually no it’s xmas(), and if you just take out the symmetrical() call it should go around.
Thanks! Your github is great, I see exactly what you did with xmas(). Very smart! Something like that switch case to change the color pockets was what I was trying to figure out but ended up having to go the long way with my code. You’ve really made a ton of cool effects, thanks for the share and ideas!
Please consider sharing this thread or code snippets to the “code samples” tag of this community 
Thanks
but I didn’t write most of that code, and I’ve borrowed some of the ideas, it’s originally from http://funkboxing.com/wordpress/?p=2154 and is frequently suggested around here for people to look at 
I just wrote xmas() and rainbow_rotate() and made a few other small mods