LedStrip run command syntax #551
-
I have been having a great time with DeviceScript so far and am looking to port over some work I did in the C++ WLED library. I am struggling to understand the LedStrip.run() command syntax though after looking at the docs and trying as many things as I could think of (LedStrip Docs). I was wondering what some basic command syntax might look like for newing up a strip with 30 LEDS, setting all LEDs to blue, then setting all LEDs to red, then rotating the strip back 3 pixels. Any light program examples would be helpful! Keep up the awesome work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There are some examples here https://github.com/microsoft/pxt-jacdac/blob/master/led-strip/client.ts however... The LedStrip "language" was invented to send the RGB LED animation updates for long strips over relatively slow Jacdac hardware link (effectively 50 kilobytes per second). We also have a simpler LED service that sends all the LED values in one packet and is limited to 64 LEDs. Either one of these can be implemented by an external Jacdac module connected over a Jacdac cable, like LED Ring or LED Strip adapter Now, most likely most of our current users don't care about these Jacdac modules (as they are hard to find) and instead would rather connect the LED strip directly to Pico or ESP32. I'm currently leaning towards adding a native driver on both of these that would be exposed similar to the SPI APIs (not through a Jacdac service). That makes it a little more difficult for us to support simulation but is otherwise simpler than the LedStrip. The API for this would be just Once we have this API it would be up to users (you? ;] ) to come up with a nice animation library. Before we have this generic API, you can just implement it for the LED service only (essentially Hope this helps and thank you for your kind words! |
Beta Was this translation helpful? Give feedback.
There are some examples here https://github.com/microsoft/pxt-jacdac/blob/master/led-strip/client.ts however...
The LedStrip "language" was invented to send the RGB LED animation updates for long strips over relatively slow Jacdac hardware link (effectively 50 kilobytes per second). We also have a simpler LED service that sends all the LED values in one packet and is limited to 64 LEDs. Either one of these can be implemented by an external Jacdac module connected over a Jacdac cable, like LED Ring or LED Strip adapter
Now, most likely most of our current users don't care about these Jacdac modules (as they are hard to find) and instead would rather connect the LED strip directly to Pico o…