petabite / uPixels

WS2812 RGB LED Strip Controller for MicroPython Enabled Micro-Controllers
https://philipzha.ng/uPixels
MIT License
14 stars 1 forks source link

Brightness of Neopixels #1

Open loizres opened 3 years ago

loizres commented 3 years ago

First of all i think your integreation of the neopixel library to control it via web is the best and easiest i've seen so far and i'm looking forward to v2.0 with uasyncioversion of uWeb.

I was searching for a way do dimm brightness especially in rainbow 'mode' and come across your code but realized that brightness level does not apply to every mode. Do you think you are able to bring brightness level to every mode in a future version? So far i tried to change the rainbow code by myself but since i'm not really good at coding i failed. Searching for a library other than the standard neopixel library of micropython is difficult because google is mostly pointing to adafruits circuitpython and the libraries i've found on git which brings brightness control is either for a pyboard but i'm using an ESP8266 or too complicated for me since they don't have proper documentation.

petabite commented 3 years ago

Hey!

Wow, I can't believe I am just now seeing this! So sorry about that. 😬 Guess I never got a notification for this issue.

I'm glad you're liking uPixels!! As for integration with my uasyncio version of uWeb, I actually ran into an issue quite early on where the ESP8266 microcontroller I'm testing on just does not have enough memory to run uasyncio while also running the web server.

As for the brightness setting for the rainbow animation, that is true. If you look at the source code, the rainbow animation uses the wheel function to determine the RGB values for each pixel and doesn't take into account the brightness set by the UI. I'll definitely take a look at adding brightness to all the animations in the future and I'll mark this as a feature request.

Thank you!!

P.S. I'm curious about how you set up the LED strip. Did you follow the instructions in the README to get it set up?