Code:
SW2             VAR gpio.1      ' Door open limit switch
You mean closed?

SW3 is a manual override in case of predators?

there may well be smarter, tighter way of coding, but this works and seems logical to my way of thinking !!
It doesn't matter if there's a more efficient way. The important thing is that this works for you, and understand what's going on.

Darrel, Henrik and a few others can make circles around me in code (actually it's a lot more than a few). But using their code isn't much use to me if I can't make changes for my application.

So, when are you putting bands on your chicken to make sure they all came in?

Robert