Skip to main content

Multi-Printer GPIO Configuration

How to map Raspberry Pi GPIO pins to commands and status outputs for specific printers using the gpio.conf file, for setups with multiple printers on one Pi.

Written by Illia Nazarko

The multi-printer GPIO configuration file lets you map Raspberry Pi GPIO pins to commands and status outputs for specific printers. Use it when more than one printer is connected to the same Pi, or when you need separate buttons or LEDs per printer.

This file replaces the basic GPIO settings. As soon as any pin is configured in gpio.conf, all button and LED settings from the settings file, described in the 3DPrinterOS RPi's GPIO Interface guide, are overridden and disabled.

1. When to use this file

If a single printer is connected to the Pi and the default Cancel and Send Bed Clear buttons are enough, use the basic setup from the 3DPrinterOS RPi's GPIO Interface guide instead. The gpio.conf file is for setups where each command or indicator must target a specific printer, or where several printers share one Raspberry Pi.

2. Where the file is and how to edit it

The configuration file is located at ~/.3dprinteros/gpio.conf on the Raspberry Pi. You can edit it in two ways, directly in the terminal or through the local WebUI on the Settings → Multiprinter GPIO page.

3. Line format

Each line of the file defines one pin mapping and holds up to four values separated by a space or a tab.

[GPIO pin] [Printer ID] [Command] [Pull value or inversion flag]

Column

Meaning

GPIO pin

The GPIO pin number on the Raspberry Pi.

Printer ID

The identifier of the target printer in VID_PID_SNR format, or * to apply the rule to all connected printers.

Command

The specific action to trigger or the output indicator to monitor.

Pull value

Optional. Defines the electrical state/logic level for the pin (e.g., up, down, disable).

Inversion flag

Optional and replaces the Pull column for output pins. Defines the electrical state/logic level for the pin (e.g., up, down, disable).

4. Finding the printer ID

The printer ID follows the USB descriptor format VID_PID_SNR (Vendor ID, Product ID, Serial Number), for example 2C99_000D_69.

You can look up the IDs of connected printers on the local WebUI Settings → Multiprinter GPIO page, or in the terminal with the following command.

curl http://127.0.0.1:8008/api2/printers_report

5. Commands

Input actions (buttons)

These commands trigger an action on the target printer when the pin state changes.

  • cancel aborts the current print job.

  • pause pauses the current print job.

  • send_bed_clear sends a command to clear/reset the bed status.

Output indicators (LEDs and relays)

Commands prefixed with out_ are used to drive hardware outputs (like LEDs or relays) based on printer events. out_bed_not_clear is an indicator that triggers when the printer detects the build plate is not empty.

6. Pull values for input pins

  • up holds the pin High (3.3 V); the command triggers when the pin is connected to ground.

  • down holds the pin Low (GND); the command triggers when the pin is connected to +3.3 V.

  • disable is the same as down, but requires an external pull-down resistor for noise protection.

7. Inversion flag for output pins

For out_ commands the fourth column is yes or no. With no, or with the flag omitted, the output is active while the event is present, so an LED on the pin lights while the bed is not clear. With yes the logic is inverted and the LED lights while the bed is clear.

8. Examples

GPIO pin

Printer ID

Command

Fourth column

Result

19

2C99_000D_69

cancel

(omitted)

Cancel button for this printer.

33

2C99_000D_68

cancel

up

Cancel button for this printer with the internal pull-up.

21

2C99_000D_69

send_bed_clear

down

Bed clear button for this printer with the internal pull-down.

5

2C99_000D_69

out_bed_not_clear

no

LED lights while this printer's bed is not clear.

9

2C99_000D_68

out_bed_not_clear

yes

Inverted output. The LED lights while this printer's bed is clear.

Did this answer your question?