Create digital inputs

The DAQ features 8 digital inputs which can be read as a group or individually. To work with a digital intput, it needs to be allocated with the Add() function: var d0 = (GpioInput)daq.Add(new GpioInput(GpioId.D0)); If a digital input is no longer needed, it must be freed with a call to the Remove() function: daq.Remove(d0); The following sample can be tested by connecting the DAQ's inputs to 3.3v or to ground through a current-limiting resistor.

Advanced configuration

A digital input can be configured using its Type property as a 'Push-Pull' or as an 'Open-Drain' input. It is also possible to specify that the digital input should use an internal resistor of type 'Pull-Up', 'Pull-Down' or 'None' using the ResistorType property. By default, all digital inputs are configured as Type 'Push-Pull' and ResistorType 'Pull-Up'. 

Sample output: 

Input state[D0] : False
Input state[D1] : False
Input state[D2] : True
Input state[D3] : True
Input state[D4] : True
Input state[D5] : True
Input state[D6] : False
Input state[D7] : False