I agreed with Racermike123 (easiest way)
To make it bullet proof. Use two different inputs for the + and -, don't just go for the on and off of one outputs
Hello Fabian, I just post a program . Did you mean like that? or can you post a program for reference?