MOVED: How to turn on the relay when the output is high

This topic has been moved to Programming Questions.