Input/Output
- DIR Command: is used to specify whether the pin is an input or an output.
-
- dir5 = 1 'makes pin 5 an output
-
- dir5 = 0 'makes pin 5 an input
- OUT Command: If the pin specified by the # is configured as an output pin (by using the DIR# = 1 command) then the state of the pin can be set high by setting it equal to 1 and low by setting it to 0.
-
- Out5 = 1 'sets pin 5 high
-
- Out5 = 0 'sets pin 5 low
- DEBUG Command: allows you to send data to to the PC Screen when the basic stamp's programming cable is still attached.
-
- DEBUG "Hello World!" 'Test message.