User Tools

Site Tools



In( )

variable = In(port)

variable The variable to store result (No String or Single)
port I/O port number (0 to 255)

Read the current state of the specified port. This function reads the state of the I/O port and stores it in the specified variable. When this command is executed, Cubloc will automatically set the port to input and read from the port. You do not need to use the Input command to set the port beforehand when using this command.

Dim A As Byte
A = In(8)   ' Read the current state of port 8 and store in variable A(0 or 1)

By default, all I/O ports are set to a high-Z (high impedance) input state at power ON. When a port is set to output, it will either output a high or low signal; high is 5V and low is 0V or GND (ground).

Go CUBLOC home

cubloc/in/index.txt · Last modified: 2016/04/14 11:07 (external edit)