joosteto / ws2812-spi

python routines to program the WS2812 RGB LED chips on the raspberry, using the hardware SPI MOSI.
GNU Affero General Public License v3.0
61 stars 24 forks source link

Modification to work on BananaPi #2

Open art103 opened 7 years ago

art103 commented 7 years ago

Thank you for writing this utility. I have just used it on the BananaPi R1 (but should apply to other sunxi platforms).

I had to modify ws2812.py to use write2812_pylist4() and replace tx=[] with tx=[0x00]. Otherwise, the SPI bus defaults to having MOSI high for a period of time before starting the sequence (checked on a scope). This was causing the 1st LED to have ~50% green always on.

For others interested, do "modprobe spi_sun7i" to enable SPI support on the BPI.

Bakipl commented 4 years ago

Thank you for writing this utility. I have just used it on the BananaPi R1 (but should apply to other sunxi platforms).

I had to modify ws2812.py to use write2812_pylist4() and replace tx=[] with tx=[0x00]. Otherwise, the SPI bus defaults to having MOSI high for a period of time before starting the sequence (checked on a scope). This was causing the 1st LED to have ~50% green always on.

For others interested, do "modprobe spi_sun7i" to enable SPI support on the BPI.

same issue on Orange Pi Zero when using numpy, when using write2812_pylist4 the first led is ok

Ataraxiall commented 3 years ago

Same error in nano pi neo, first led always green.any idea?

Thanks!