Combine and input and output pin for a protected output.
The SerialWombtProtectedOutput class is assigned to a Serial Wombat output pin. It monitors another previously configured pin's public data, such as a digital I/O value or an Analog input. If the monitored value does not meet expectations, then the protected pin changes values to a configured state. This allows the Serial Wombat chip to constantly verify a condition without the need for constant polling from the host device.
Warning
The SerialWombatProtectedOutput is intended to help prevent accidental damage to hobby circuitry. The Serial Wombat chip and its associated libraries are not designed for use in Safety Critical applications. The Serial Wombat chip should not be used in situations where a malfunction or design defect could result in damage to property, economic loss, or harm to living people or creatures.
The period of time that a mismatch must occur before going to the safeState is configurable.
Turn off the protection features and make the protected pin an unprotected output.
This function is compatible with the Arduino digital write, and therefore uses HIGH and LOW as parameters rather than SW_HIGH or SW_LOW /param state HIGH or LOW