ezeio2:scriptref:getinputvalue

This is an old revision of the document!


Fetch the value of a hardware input.

Description

GetInputValue( inputno, mode )

The value returned will depend on the hardware mode of the input, which should have been set already using the SetInputMode command.

Parameters

inputno Input number to read. Inputs 1-8 are on the ezeio. Use “DVCn+inputno” for expansion devices
mode The desired read mode. See below.

Input numbers:

Input Description
IN_1 .. IN_16 Input numbers (equivalent to 1 .. 16)
IN_VIN Supply voltage (in mV)
IN_VBAT Voltage on Battery Terminals (in mV)
IN_V5 5V regulated output voltage
DVC1+IN_1 (example) First input on first expansion device

Available read modes:

Mode Reading
INVAL_RAW Momentary value. Unit depends on input hardware setting.
INVAL_INTERVAL Pulse interval in mHz
INVAL_COUNT Pulse count

Return value

Value of input

Example usage

    new x;
    x = GetInputValue(IN_3, INVAL_RAW);  // Return the current value of the input
  • ezeio2/scriptref/getinputvalue.1566079621.txt.gz
  • Last modified: 2019-08-17 22:07
  • by andreh