I'm looking to setup some lights on my printer. I can easily connect the lights using a pin on the controller (that can be controlled using gcodes), or a pin on the raspi (3B+). These lights can be switched on / off using existing plugins on Octoprint.
However, I want the lights to switch on automatically a couple of seconds before a photo is taken and then switched off after a couple of seconds. Want to create good looking timelapses, but don't want the lights to be on all the time.
Any suggestions would be great. Thanks.