Searched a lot but... how do I add an on/off button?

I feel crazy, but I can’t find instructions for, say, a momentary button press (or non-momentary) that when pressed it turns off the pattern. I assume I can just wire up some output to and input pin and when the button is pressed the output goes to the input?

Just strange I can’t find any discussion of this or in docs? Somewhere I saw a note that only GPIO-33 worked (seemed an older version).

Also — how do you turn the PB off? I literally just pull the power everytime…

Hi @a19grey ,
There’s a few options. First, in the interface, you can slide brightness all the way down.
Many folks also make an “off” pattern. This “off” pattern can then be activated via the button by cycling patterns until you reach it (or switched to in the interface).

It’s also possible to add a small bit of code in patterns to read an analog value controlled by a potentiometer, and use that to modulate brightness, which can go down to “off” levels.

Yes, Pixelblaze before hardware V3.6 only had 1 usable analog input. Recent revisions have many more pins broken out to solder pads on the underside, many of which support analog. Any of the 5 analog inputs on the Sensor Board can also be used.

Similar to an analog physical control, you could use a digital input for on/off control. This could be wired to a physical toggle switch.

However, all of these options will still consume some power when “off” as most addressable LEDs can draw up to 1mA per pixel when off, and Pixelblaze itself draws some power to keep it running and responding on WiFi.

Cutting power to Pixelblaze & LEDs is a 100% perfectly fine way to turn it off as well.

Aside from wearables, I leave my Pixelblazes on all the time, and use the schedule on/off settings for things I don’t want blinking in the middle of the night.

2 Likes