Syntax: OUTPUT Pin
Make the specified pin an output.
* Note: expressions are not allowed as arguments on the BS1. The range of the Pin argument on the BS1 is 0–7.
|BS1 and all BS2 models|
There are several ways to make a pin an output. Commands that rely on output pins, like PULSOUT and SEROUT, automatically change the specified pin to output. Writing 1s to particular bits of the variable DIRS makes the corresponding pins outputs. And then there’s the OUTPUTcommand.
When a pin is an output, your program can change its state by writing to the corresponding bit in the OUTS variable (PINS on the BS1). For example:
OUTPUT 4 PIN4 = 1
OUTPUT 4 OUT4 = 1
When your program changes a pin from input to output, whatever state happens to be in the corresponding bit of OUTS (PINS on the BS1) sets the initial state of the pin. To simultaneously make a pin an output and set its state use the HIGH and LOW commands.
BASIC Stamp Help Version 2.5.4
Copyright © Parallax Inc.