Hi all !
I’m developing a project where I’m using the outputs of the automation hat mini to activate a relay to turn on some lights in a greenhouse.
I’ve tried to use the outputs directly, but had run into some problems (mainly because the outputs are small and some wires would touch - i think).
Now, in my code I activate the output, but as soon as the program ends, the output turns off and the external relay turns off also.
I need to keep it on until I turn it off from another thread. Is there any way of archiving this ?
I’m using threads (to not block the main program) with a time.sleep, but it’s not working for the time I want (hours, not minutes or seconds).
I’m also using a output to activate a air pump for 30 minutes and it’s working fine.
I can’t use the relay because it’s being use with a water pump - and working .
Can I use any other method or something ?
thank you