GHIElectronics.UAP.Shields.FEZHAT.ReadAnalog C# (CSharp) Method

ReadAnalog() public method

Reads the current voltage on the given pin.
public ReadAnalog ( AnalogPin pin ) : double
pin AnalogPin The pin to read.
return double
        public double ReadAnalog(AnalogPin pin) {
            if (!Enum.IsDefined(typeof(AnalogPin), pin)) throw new ArgumentException(nameof(pin));

            return this.analog.Read((byte)pin);
        }