InputBit Method

int InputBit(int port, int bit)

Summary

This method retrieves the value of a single bit within a digital I/O port. It is provided simply for convenience, since it internally calls the InputByte Method to determine the value of the specified bit.

Parameters

  • port - Specifies the port number (0-5) to read.

  • bit - Specifies the bit number (0-7).

Return Value

This method returns an integer. The return value is the current value (0 or 1) of the specified bit.

See Also

InputByte Method, OutputBit Method, SetDirectionBit Method, InputBitBool Method