Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less than 6 LEDs results in flickering and wrong colors of LEDs #70

Open
cp2004 opened this issue Jun 27, 2021 · 2 comments
Open

Less than 6 LEDs results in flickering and wrong colors of LEDs #70

cp2004 opened this issue Jun 27, 2021 · 2 comments

Comments

@cp2004
Copy link
Contributor

cp2004 commented Jun 27, 2021

This was reported to me as a downstream maintainer, but I have also confirmed it myself. Report (cp2004/OctoPrint-WS281x_LED_Status#132).

The problem
Using less than 6 LEDs in the strip initializer creates incorrect colours. It also, for example when trying to use the rainbow effect (from strandtest) flickers lots.

A solid colour of red when I set 5 LEDs, actually creates a gradient from kind of pinkish colour to blue on the 5th LED.
Setting to 6 LEDs sets full red, as expected.

This doesn't seem to be the case when using the C library, there's no 1:1 strandtest.py-type script that I can find to actually work. The matrix style one seems to work the same across all configured lengths of LEDs.

Steps to reproduce

  1. LEDs connected to pin 10, using SPI, properly configured and normally working
  2. Install this library, and use the strandtest.py script with LED_COUNT = 5 or less
  3. Run script, observe lots of incorrect colours.

I can reproduce this, and it was reported by another user.
This doesn't seem to be a problem with running the test straight from the C library, without the Python bindings. I am currently unable to test if it also occurs using PWM/GPIO 18.

System Info

  • Raspberry Pi 4 Model B Rev 1.1
  • OctoPi 0.18 - Image based on Raspberry Pi OS from December 2020, up to date
  • Python 3.7.3 & 2.7.16

I have been trying to debug this, but have no idea where to start. C code confuses me. If there is anything that could be looked at properly with a debugger, I can try and do it.

@Gadgetoid
Copy link
Member

Does this still happen as of v5.0.0?

@cp2004
Copy link
Contributor Author

cp2004 commented May 16, 2023

I will add it to my list of things to test, but it will not be for a couple of weeks I think. I will try and let you know as soon as I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants