Exemple #1
0
        protected async override Task Initialize(ISocket parentSocket)
        {
            this.x = await parentSocket.CreateAnalogIOAsync(SocketPinNumber.Four);

            this.y = await parentSocket.CreateAnalogIOAsync(SocketPinNumber.Five);

            this.input = await parentSocket.CreateDigitalIOAsync(SocketPinNumber.Three);
        }
Exemple #2
0
        private double Read(AnalogIO input)
        {
            var total = 0.0;

            for (var i = 0; i < this.SampleCount; i++)
            {
                total += input.ReadProportion();
            }

            return(total / this.SampleCount);
        }
 protected async override Task Initialize(ISocket parentSocket)
 {
     this.input = await parentSocket.CreateAnalogIOAsync(SocketPinNumber.Five);
 }
Exemple #4
0
        protected async override Task Initialize(ISocket parentSocket)
        {
            this.input = await parentSocket.CreateAnalogIOAsync(SocketPinNumber.Three);

            this.enable = await parentSocket.CreateDigitalIOAsync(SocketPinNumber.Six, true);
        }