arduino: Voltage checking simulation

Issue #84 resolved
Alan Noble created an issue

It would be useful to simulate voltage checking for testing purposes. It is proposed to make the X10 pin a bidirectional pin. As an input pin, which is its current mode, X10 reports the raw measured analog value. As an output pin, a non-zero value of X10 would supply a temporary analog value to be used in the following cycle, then get reset to zero.

Here is how a low-voltage would be simulated:

  • Add X10 to device output pins.
  • Add a variable TestVoltage and set its value to be less than AlarmVoltage.
  • Add an actuator to send the TestVoltage value to X10.
  • Wait for the device to enter the alarmed state.
  • Either remove X10 from the outputs, increase the TestVoltage value, or delete the actuator.
  • The device should exit the alarmed state.