How do execute GPIO commands before and after a job?

I would like to cause a set of GPIO pins high before a job, and once it is complete, set them low. Ideally it would be great for whatever script is setting the pins high could scan the gcode of the job. Based on whether a specific comment was in the gcode, that would effect which pins were set high. I would also like to read a GPIO value and if it is high, open a dialog in the web interface to warn the user. Is this possible with Repetier-Server? How and where do you create the pre and post job handlers? Thank you.


  • Adding code is easy. In Printer configuration->GCodes->event dependent are codes for before print, after print and do not forget stopped print in case it was aborted.

    Commands for enabling them are in global settings->gpio visible and depend on name you gave the pin. 
    With our computed expression you can also check if it was already high. Something like this:

    @if {{get_gpio_state('nameOfGpio')==1}}
    @info "Pin was already high"
    @pause PinHigh

Sign In or Register to comment.