Closed ccorcos closed 6 years ago
I figured it out. Just a lot of documentation reading. :)
Sorry for the long delay on replying on this. I'm glad you could sort it out already. Feel free to submit more questions if you need!
Hey @hhromic I have a question for you. I'm driving some WS2811 LEDs with this library and it appears to work, but there are some quirks I've yet to figure out.
Basically, if I send just a single packet, nothing happens. If I send packets at a slow rate, some lights appear, but not all of them and its really glitchy. If I send packets at a fast enough rate, everything appears to work, but there's a lot of wasted performance. If I want to drive 20,000 of these LEDs, ideally there wouldn't be any wasted packets.
For reference, here's my code. Its kind of a mess: https://github.com/ccorcos/rainbow/blob/master/server/led.ts#L343-L387
Basically, I just have a bitmap that I write pixels to, and then I read from the bitmap to send packets. That all happens in the renderTestSweep
function and I run that as fast as possible. In the updateLoop
I update state of the animation at a slower rate. It just seems like a lot of wasted computation here...
function testSweep() {
let state = 0
const updateLoop = async () => {
while (true) {
state = (state + 1) % pixelsPerOutput
// await wait()
await delay(1 / 30 * 1000)
}
}
const renderLoop = async () => {
while (true) {
await renderTestSweep(state)
}
}
updateLoop()
renderLoop()
}
Hey there, I'm trying to figure out how I can use this library to control the LEDs on a PixLite MKII.
http://www.advateklights.com/shop/pixlite-pixel-mapping/50-pixlite-16-mkii-control-board.html
It says it supports sACN E1.31 so I figured this would be the perfect library to use. :)
Perhaps I'm misunderstanding the library, but how to I control a specific LED or set of LEDs using this library?
I ran the demo code, but it doesn't seem to be working.
I've set the static IP address and I have the universe and channel number:
Now I'm running the code... I'm confused about what the packet is and how to fill the buffer in order to trigger certain LEDs. Furthermore, the controller has server LED banks to choose from on the hardware side and I have no idea where that is specified in this library.
Anyways, I would appreciate any help or suggestions you have :)