Skip to content

pedrolamas/klipper-virtual-pins

Repository files navigation

Klipper virtual_pins module

Project Maintenance License

Follow pedrolamas on Twitter Follow pedrolamas on Mastodon

Klipper Virtual Pins is a Klipper helper module that allows usage of virtual (simulated) pins.

This module allows configurable pins to be set to virtual_pin:<id> as a way to mitigate the limited number of available pins provided by the MCUs.

Note: virtual_pins will be able to simulate most pins, with the major exception of steppers step_pin and dir_pin (please use MCU pins for these).

Install

Clone this repository from git and run the install script:

cd ~
git clone https://github.com/pedrolamas/klipper-virtual-pins.git
./klipper-virtual-pins/install.sh

Usage

First, add an empty [virtual_pins] section to your printer.cfg to enable the virtual_pins:

[virtual_pins]

After that, use virtual_pin: prefix followed by a random identifier (example virtual_pin:test)

Here's a fully working printer.cfg snippet:

[virtual_pins]

[output_pin test]
pin: virtual_pin:test_pin
pwm: True
cycle_time: 0.1

Credits and Acknowledgements

License

MIT