BASIC stamp manual v2.2
5: BASIC Stamp Command Reference – POT
BASIC Stamp Syntax and Reference Manual 2.2 • www.parallax.com • Page 341
' {$STAMP BS1}
' {$PBASIC 1.0}
SYMBOL PotPin = 0 ' pot connected to P0
SYMBOL Scale = 111 ' scale value for test circuit
SYMBOL level = B2 ' storage of pot "level"
Main:
POT PotPin, Scale, level ' read pot level
DEBUG CLS, "Level = ", #level ' display
PAUSE 50 ' short delay
GOTO Main ' repeat forever
END