This plugin will allow fairly comprehensive control of NeoPixels from Octoprint.
- Use your Raspberry Pi to power and control your NeoPixels. (I have tested powering up to 25 pixels from a Raspberry Pi 4).
- Change color and intensity from a color picker dialog.
- Intercept GCODE M150 commands and execute them on the Raspberry Pi.
Install via the bundled Plugin Manager or manually using this URL:
https://github.com/brettvitaz/OctoPrint-Neopixel_Illumination/archive/main.zip
The GPIO pins require elevated privileges to use. A separate API script will be run as root
user to connect the plugin to the NeoPixel's GPIO pin.
This currently requires that the Raspberry Pi's pi
user has the default password.
This can change based on your needs, but a recommended pin is GPIO 18.
If running a small number of pixels, they can be powered directly from the Raspberry Pi.
Please carefully review these instructions for wiring your NeoPixel strip to the Raspberry Pi.
n.b. I have witnessed damage to both Raspberry Pis and Arduinos when improperly wired.
Log in to your Raspberry Pi:
$ ssh pi@octopi.local
Enable SPI mode from Raspi Config:
$ sudo raspi-config
Select 4. Interface Options
, P4. SPI
, Yes
, OK
.
Open the OctoPrint configuration dialog and select Plugins | NeoPixel Illumination.
- Enter the pixel color order for your NeoPixel controller.
- Enter the GPIO pin.
- Enter the number of pixels in the device or strip.
- Choose if you want to parse GCODE for M150 commands.
- Enable the plugin.
Choosing a color from the color picker will save it as the start-up color.