@dscalperz Tipsy is correct his way is the easiest because it only uses one word in one block, principally it is the same as Loka Heng's way, they both use the if turn_on_and_off bool is true do this, just uses one constant instead of comparing the left and right operand.
D