📖⚡INPUT

Sets a pin tri-state to "Input".

 
This means the pin can no longer conduct power (either In or Out). It will instead "Detect Inputs" - such as button presses.
The INPUT command only affects chips with pins that can change direction (Kic8).

Note: Do not confuse the INPUT command, with setting a pin LOW to "sink" power.

Syntax

INPUT PinNumber

Example


 

' INPUT Example
' Input.txt

' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
' Select Kic8 for this to compile
' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  ' Set all pins to outputs
  DIRS = %11111111

  ' Use INPUT command to make individual inputs
  ' Observe pin diretion in simulator turn green
  INPUT 1
  INPUT 2

Related commands: