I built a Red Button to disable my pi-hole!
This was inspired by Christopher Moravec see his original repo and youtube video.
The button design with the Raspberry Pi Pico W in the base was inspire by Dmytro Panin BOB
As I didn't like to purchased a new micro controller or a of the shelf button I designed, inspired by BOB, my own button case.
I also change a bit the code from Christopher Moravec to suite my needs as I have only the ws2812 leds and didn't like the idea to have some things hardcoded so I moved them to the settings.py
Hardware you need:
- Raspberry Pi Pico W
- (Cherry) MX Switch
- 3 * WS2812 LEDs
- 2 M3 x 10mm screws
To get this working:
- I solder the WS2812 LED strip to the Raspberry Pi Pico W VBU, GND, GP28 and the MX switch to GND and GP6 like this:

- More details about the assembly you see in the images folder
- Flash your Raspberry Pi PIco W with CircuitPython download
- Copy
main.py,setings.py, andsettings.tomlonto your Raspberry Pi Pico W - Install CircuitPython packages. I use circup for this:
circup --path /run/media/nils/PIHOLEBUTTO install --auto-file main.py - Update
settings.pywith your pi-hole's API key, pi-hols hostname/IP and Pins on your Raspberry Pi Pico W. - Update
settings.tomlwith your wifi information.
Some useful links: