public virtual void InitialResetDeviceViaPin()
        {
            // 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_PULLUP to cancel the reset
            SimulatorClient.PinMode(ResetTriggerPin, PinMode.INPUT_PULLUP);
        }
예제 #2
0
        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_PULLUP to cancel the reset
            SimulatorClient.PinMode(ResetTriggerPin, PinMode.INPUT_PULLUP);

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

            // Ensure the irrigator restarted
            WaitForText(IrrigatorStartText);
        }
        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);
        }