|
Re: Creating a class for a new piece of hardware
As Alan mentioned if it was NPN you could just use a DIO and they do have an NPN version AE6-AN-4F (replace the AP with AN in the part number) Thus when the switch is closed it will be sinking the DIO to ground, when the switch is open there is a built-in pull up resisitor in the sidecar which pulls the DIO high by default.
So high the switch is Open, Low the switch is closed. Just use the DigitalInput class and you should be golden...
let us know if that works for you.
|