digitalio

This library is used to send and receive data through one of the pins.

It is most often used to get a brake trigger input or to send an external output to tell a third-party program some information from the VBOX Touch.

Note:

VBOX Touch can use this module with external digital I/O devices. MFD Touch cannot use this module.

enable callbacks

This function is used to enable callbacks from the digitalio.

digitalio.enable_callbacks(state)

Input Parameters:

  • state[bool] = used to enable or disable the callbacks

get

This is used to get the status of digitalio pin0 and pin1.

digitalio.get()

Returns a tuple of bools (pin0, pin1).

intcfg

This function is used to set the current config for the digital IO.

digitalio.intcfg()

Returns a tuple of the following (enabled_high=int, enabled_low=int).

out0 set

This function is used to control DIG_OUT.

digitalio.out0_set(state)

Input Parameters:

  • state[bool] = sets the state of DIG_OUT

pins

pin0 is by default used for trigger inputs but can also be used for outputs that aren’t from GNSS.

pin1 is by default used for 1PPS GNSS output that is used to sync other devices, however, it can also be used to take inputs.

PPS enable

This function controls the 1PPS (Pulse per Second) - the loopback from GNSS PPS to DIGITALIO1 on the VBOX Touch unit.

digitalio.pps_enable(state)

Input Parameters:

  • state[bool] = When True, enables the 1PPS loopback from the GNSS PPS to DIGITALIO1. When False, disables it.

set callback

Used to set the function that is called when a digital input is received.

digitalio.set_callback(callback)

Input Parameters:

  • callback[func] = The callback function to be triggered when a digital input is received.