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

Problem changing number of leds. #53

Open
KrutaCode opened this issue Sep 6, 2021 · 3 comments
Open

Problem changing number of leds. #53

KrutaCode opened this issue Sep 6, 2021 · 3 comments

Comments

@KrutaCode
Copy link

I have roughly 300 LEDs in a strip. The program works great but only for 144 LEDs. When I tried to change the number of LEDs in both config.py and off.py, I encountered these issues.

.. /led.py, line 105, in _update_pi
if np.array_equal(p[:, I], _prev_pixels[:, I]):
IndexError: index 330 is out of bounds for axis 1 with size 330

I've been trying for a while now to fix it but no luck. If anyone could help with a solution that would be great. Love the project otherwise.

@naztronaut
Copy link
Owner

Did you change it to 300 or 330? Which visualization are you trying?

@KrutaCode
Copy link
Author

Thank you for getting back. I put in 330 for the LED_COUNT and I have tried using both scroll & energy, and the error occurs on both of them.

@naztronaut
Copy link
Owner

That's very strange. And it works if you change it to 144? What if you do 300? Have you changed anything else?

Numpy indexing starts at 0 so a couple lines above line 105, the loop is range(config.N_PIXELS) so it should use values 0 to 329 when looping.

in the past, I've tested with values as high as 700 without a problem. The number just has to be divisible by 2. I don't have an active set up for this project at the moment but I can see if I can give it a try this weekend.

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