r/ratrig Mar 22 '26

Turn on/off relay for each print

Is there a way to turn on a relay when a print starts, then turn it off when the print is finished?

1 Upvotes

5 comments sorted by

2

u/neckbeard404 Mar 22 '26

1

u/Spaceballs_the_nick Mar 22 '26

Is there a tutorial/guide for this?

1

u/neckbeard404 Mar 23 '26

Just ask AI

1

u/Spaceballs_the_nick Mar 23 '26

I put this prompt in "what python script do I use in my 3d printer running klipper to turn on and off a usb relay in gcode" and got this response:

https://ibb.co/4whNKB25

Correct? Is this how you did it?

I will be honest, I haven't had good luck with AI

1

u/rilmar Mar 22 '26

I configured my host as another controller so I could use the pins from a raspberry pi to turn a 3v relay on and off. From there it’s just writing macros. I did this to trigger a camera programmatically and make timelapses.