set_dio Moku:Go

Configure the Digital IO direction

Digital I/O is configured for Input or Output at the pin level. To use DIO with Multi-instrument mode, the user must complete three steps:

  1. Set up the required instrument in the target slot,
  2. Configure inputs and/or outputs of that slot to be connected to the Digital I/O, and
  3. Configure the direction of the Digital I/O pins individually to meet the needs of the instrument.

The instrument itself cannot govern the pin direction. Pins default to inputs. Pin direction is generally specified using the direction_map parameter below which accepts a list of one or more maps, each map sets the direction of a single pin. This can get cumbersome, so a convenience parameter direction exists which simply takes a list of exactly 16 0s and 1s, corresponding to input or output (respectively) for each of the 16 pins in the DIO block.

Parameters

A list of maps of pin and direction to configure. Must not be specified at the same time as `direction`
default: nil
allowed values:[{pin: 1, direction: 1}]
array
List of 16 DIO directions, one for each pin. Where, 0 represents In and 1 represents Out. Must not be specified at the same time as `direction_map`.
default: nil
allowed values:[0/1, ...]
boolean
Disable all implicit conversions and coercions.
default: true

NOTE

It is required to connect DIO to a slot before configuring it. Read set_connections

# Examples