public virtual void ResetDeviceViaPin()
        {
            // Close the connection to the device
            DisconnectDevice();

            // Set the reset trigger pin LOW (false) to begin a reset
            SimulatorClient.DigitalWrite(ResetTriggerPin, false);

            // Give the pin some time at LOW to ensure reset
            Thread.Sleep(10);

            // Change the reset trigger pin to an input to go back to normal
            // TODO: Implement a cleaner way to do this
            SimulatorClient.DigitalRead(ResetTriggerPin);

            // Re-open the connection to the device
            ConnectDevice();

            // Ensure the irrigator restarted
            WaitForText(IrrigatorStartText);
        }
예제 #2
0
 public bool SimulatorDigitalRead(int pinNumber)
 {
     return(SimulatorClient.DigitalRead(pinNumber));
 }