News for hackers. Stuff that matters.
Re:Over-engineering an RGB LED strip: let’s make a custom pr... by Tempest1981 on Sunday July 17, 2022 @04:11PM (#32130742)
How 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.)

Re:Over-engineering an RGB LED strip: let’s make a custom pr... by misterdata on Sunday July 17, 2022 @04:34PM (#32130945)
The interpreter will throttle the program to a certain frame rate - it will suspend the program on each ‘yield’ instruction and resume the program when a new frame is needed. It can also ignore the yields to get as high a frame rate as possible. Programs should not poll but use get_precise_time to draw what is necessary for that time stamp.

(And yes, the LEDs use way more power than the CPU here)

Re:Over-engineering an RGB LED strip: let’s make a custom pr... by Tempest1981 on Sunday July 17, 2022 @08:24PM (#32133064)
Ah, much cleaner, cool.