Skip to main content

IN

Syntax

IN ( expression )

Description

When reading from IN (expression), -1 or 0 will be returned corresponding to the voltage level on the pin numbered expression.

This directive does not change the input/output configuration of the pin.

The ARMmite allows control of 24 pins (0..23), with pins 16..23 shared with the AD pins.

Example

' Set pin 9 as an input

INPUT 9

' Assume an external device has driven pin 9 high

PRINT "The
current value of Input pin 9 is "; IN(9) AND 1

The current value of Input pins is 1

Differences from other BASICs

  • no equivalent in Visual BASIC
  • equivalent to IN0..15 PBASIC

See also