Did I understand right: it is impossible to make a driver for WS2812B LED with current Meadow timing? Now the min time (v 3.10) of the GPIO impulse is approximately 430us (In the docs for v3.6 it is 4ms). But WS2812B is required less than 1us.
Currently that’s correct - I just spent a couple hours trying to make certain.
TL;DR; It won’t work with the current Meadow software
The problem is that the “inter bit gap” in the comms for a 2812 has a maximum of 6us. You can easily stay inside that using a SPI bus MOSI pin, with the bus in Mode 1 (normally low MOSI) but only for 16 bits and only if you set the SPI word length to 16. The 2812 needs 24 bits per pixel. Once you exceed the 6us low the chips assume it’s a reset.
The time between writes from the meadow exceeds this right now due to our execution speed, so while you can get it to send 2 bytes that meet the timing requirements, you need 3 for a single pixel. So you can’t even get it to to a 1-pixel string.
There are 3 possible paths forward to get it working for meadow 1. Implement AOT and see if the timing gets good enough to meet the requirements. Might be able to just bit-bang it then. Interrupts, GC, etc might cause issues though, so that would require some testing. 2. Implement DMA to SPI so you could just give the bus a full buffer of bits and have it send those. 3. Write a native driver specifically for these lights.
#1 is in process. #2 is generally a post v1 feature - we’ll probably look at DMA for a few things, so this would fall into that bucket. #3 I don’t think we have any current plan for. It’s technically feasible, but we have a lot of other higher priority things we’d want to do first, so this would be a post v1 thing at the earliest.
Right now the only working driver available in Meadow.Foundation for addressable LEDS strips are APA102, you might want to check that out.
I got these in Amazon and they worked great. You’ll also need an external power source, because turning them all on using the 5V and GND pins will def burn your board (so be careful). I got this one because it has a USB port in the plug connector, so you would only use one socket off the wall outlet.