Thread: Saving mastercard inputs?
01-30-2011, 09:07 AM #1
- Join Date
- Jan 2008
- Sydney, Australia
Saving mastercard inputs?
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?
By Hans Krohn in forum PMSystemsReplies: 13Last Post: 04-04-2011, 07:50 PM
By Paul G in forum Computer Hardware SetupReplies: 0Last Post: 08-15-2008, 04:49 AM
By Drewsta in forum General Builder Questions All Aircraft TypesReplies: 12Last Post: 06-27-2008, 04:46 PM
By Patrick Smith in forum PM General Q & AReplies: 1Last Post: 06-27-2007, 12:29 AM
By Greg Theulings in forum PM General Q & AReplies: 1Last Post: 01-24-2006, 09:12 AM