Hi guys,
I'm trying to save up mastercard inputs when connecting up.
Say we have a switch On-Off. We could just use one input for, say, "On" position, then the code could easily negate it's state if we wanted and assign it to the "Off Variable".

In case of 3 positions rotary switch only two inputs are needed, the 3rd position variable value is calculated as:
third = (first == 0 and second == 0)

That will all work fine. But my question is on initialization. Presumably if all hardware inputs are connected then variables take their natural state. But if we have derived value, some initialization has to happen.

Basically we need to execute: "third = (first == 0 and second == 0)"
on startup, but after the "first" and "second" have been read from the hardware.

Has anyone tried this approach with success or am I better of connecting all hardware inputs?