WS2812B on SPI1 behaves different than on SPI0
See original GitHub issueDescribe the bug
When trying to run the sample from the repo with using SPI1 (GPIO 20) instead of SPI0 (GPIO 10), the strip lights up as almost completely white. A hint of color can be seen (red becomes a very light pink) can be noticed, as well as changes when using the TheatreChase. But when using e.g. Black in ColorSwipe, the strip becomes white.
Because we need to use SPI0 for another device, we need to switch to SPI1. Alternatively, an implementation with PWM would possibly work.
Steps to reproduce Enable spi1 by adding
dtoverlay=spi1-1cs
to /boot/config.txt and reboot.
Then change
SpiConnectionSettings settings = new(0, 0)
to
SpiConnectionSettings settings = new(1, 0)
and run the code
Expected behavior
The strip color should be the same when using either SPI0 or SPI1.
Actual behavior
The color is almost completely white when using SPI1.
Versions used
dotnet --info
on the machine being used to build: 5.0.401dotnet --info
on the machine where app is being run: 5.0.400- Version of
System.Device.Gpio
package: 1.5.0 - Version of
Iot.Device.Bindings
package (not needed if bug is inSystem.Device.Gpio
): 1.5.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
“-3cs” just enables more chip select lines. For WS2812B none is needed, so I’d like to keep it as low as possible. Anyway I’ve tested that and it doesn’t make difference.
It also seems that the SPI itself is enabled correctly because the “Animation” is perceptible.
UART is disabled.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.