I would try 2 things. First, use an int with values 1,0 instead of a boolean for onState.
Secondly, change the char passToTurnOff,On "declarations" to int, and move out
of the if..then constructs.
I would try 2 things. First, use an int with values 1,0 instead of a boolean for onState.
Secondly, change the char passToTurnOff,On "declarations" to int, and move out
of the if..then constructs.