Servo Control Interface Help Request

Hi all-

I want to request help in developing a plugin. I lack the proper python-foo... but have and idea that I think has merit- integrate GPIO servo control into Octoprint. I think that this could be very useful.

I have been using the servo control function in Marlin with custom controls, but its limited to slipping in the commands into the gcode print stream.

Can someone help me in figuring out how to make simple interface to integrate into Octoprint?

Here are a couple of pages that demonstrate raspi GPIO servo control:


git repository of the python scipts is here-

thanks in advance

Dennis P

Well, I think I can help get us partially there. I too have the same need. I have a servo I want to control to deploy a brush into the way of the extruder on my 3D printer, that the extruder then moves back and forth over to clean off the extruder before starting a print. I have been toying with this for awhile, as the main board in my printer (Geeetech A30) has absolutely no place to connect a servo to in order to control it through G-Code. I found something called a Sparkfun Servo Trigger that will handle the servo control portion. It is configurable through trimmer pots on the board that set where the servo goes to when triggered, holds it there, then re-homes it when triggered again, and even the transit time it takes to do all of that. It can be triggered either manually by a simple switch, or driven by a logic pin (high/low output). The key is going to be finding a way to drive a GPIO pin on the Octopi high (trigger the servo to deploy the brush), and then low (return the brush to home). My hope is, we can find a way to cause octopi to trigger the servo, use G-Code to move the extruder into position and perform the back and forth scrub, return the extruder to home and then trigger Octopi to cause the servo to home the brush. I first thought about using the I2C on the Octopi, but have that occupied by a filament weight scale I made that gives me readings about how much filament remains on the spool currently loaded on the printer, so I have to find another way to drive another GPIO pin high/low.