cat-in-136 / ws2812-esp32-rmt-driver

WS2812 driver using ESP32 RMT for Rust
MIT License
40 stars 21 forks source link

Add support for zigzag layout neopixel matrix #29

Open punkto opened 11 months ago

punkto commented 11 months ago

Hi,

I have a Neopixel array like these:

I wanted to use your crate to drive the array, but I found that it is not supported (or I have not found the way). I found as reference the NEO_MATRIX_ZIGZAG option in https://learn.adafruit.com/adafruit-neopixel-uberguide/neomatrix-library

I wonder if you would like to add this functionality on your crate. If it is the case, I can send to you a PR with the changes but I would need some guidance.

Regards.

cat-in-136 commented 11 months ago

NeoPixel can be in any possible wiring order. ws2812_esp32_rmt_driver::lib_embedded_graphics::LedPixelShape trait is provided for the functionality to represent a Point to LED pixel address conversion.

In order to use the ZigZag-layout LED matrix, it is currently necessary to create a new LedPixelShape your own. (unstable option required)

punkto commented 10 months ago

Thanks for your comments and please excuse the delay in answering.

Following your guide, I have developed a pair of LedPixelShape that cover my needs. If you are interested, they are here .