IO[n]
, where n is the pin number. The Binho Nova Multi-Protocol USB Host Adapter features 5 pins, therefore the only valid values for n are integers from 0 through 4.MODE
to DIN
. The value of the input can then be queried. The following example demonstrates how to use IO2 as a digital input and get it's current value.MODE
to DOUT
. The value of the pin can then be set using the VALUE
command. The following example demonstrates how to use IO2 as a digital output and set its output to HIGH.MODE
to AIN
. The value of the pin can then be queried. The measured value will be returned in both ADC counts (12-bit integer) and in units of volts. Note that the voltage reference is 3.3 Volts. The following example demonstrates how to use IO2 as an analog input and get it's current value.MODE
to AOUT
. The output voltage can then be set using the VALUE
command. The output voltage can be set either by passing a voltage or a 10-bit integer value. Note that the voltage reference is 3.3 Volts. The following example demonstrates how to use IO1 as an analog output.VALUE
command.