Over-engineering an RGB LED strip: let’s make a custom programming language
1–10 of 22 posts
Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#2Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#3I see a 'get_precise_time' command. I guess you could poll that, if you aren't worried about power use. (LEDs using far more power than your CPU.)
Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#4How did you implement "sleep"? For timing the effects? I see a 'get_precise_time' command. I guess you could poll that, if you aren't worried about power use. (LEDs using far more power than your CPU.)
(And yes, the LEDs use way more power than the CPU here)
Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#5Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#6I also tried streaming patterns (could've been really cool to hook it up to something like ColorCord), but my Wifi connection was definitely also too unreliable for that (hmmm, what about PoE LED strips?).
There's some project based on Javascript (I think) with in-browser previews for the patterns, but it's proprietary and only sold as pre-flashed modules. I forgot the name, but I think it has been posted here.
This bytecode-custom-language solution definitely looks over-engineered (wish I could use a language I already know to make an animation), but damn, it should be efficient. I think I'll play around with it bit.
Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#7Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#8Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#9I'm surprised you didn't use floating point math, it seems cumbersome to make animations that way. My attempt at programmable LED strips used Lua (like that: https://gist.githubusercontent.com/Milek7/760a683f3480a4ff95... ), though they were driven directly from Linux SBC. https://milek7.pl/.stuff/26gru.webm
Nevertheless it shouldn't be that difficult to change the interpreter to use floats instead of ints as base type (mixing the two would be more involved I think).
Re: Over-engineering an RGB LED strip: let’s make a custom programming language
#10Related: a multi-program programmable LED strip (in Lua, allows the led strip to be split up into multiple segments) https://zeus.gent/blog/21-22/ledstrip_sandbox/ with the code on https://github.com/ZeusWPI/ledstrip_sandbox