Download Print this page

Parallax 27808 Quick Start Manual page 8

Gimbal joystick with adapter

Advertisement

Next, enter the following demo program into the BASIC Stamp Editor software. (Or, download 27808-
Gimbal-Joystick-Debug.bs2 from the www.parallax.com, search "27808").
software is a free download from http://www.parallax.com/basicstampsoftware):
' {$STAMP BS2}
' {$PBASIC 2.5}
LR VAR Word
UD VAR Word
DO
HIGH 4
PAUSE 10
RCTIME 4, 1, UD
HIGH 11
PAUSE 10
RCTIME 11, 1, LR
DEBUG HOME, "Vert:
"Horiz:
PAUSE 50
LOOP
Press the F9 key to load and run the program. You should see output that looks like this:
As you move the joystick around, the numbers will change with the positions of the horizontal and
vertical axes. These values may be used as-is, or scaled to appropriate input values for the device you
would like to control with the joystick.
Copyright © Parallax Inc.
", DEC UD, CLREOL, CR,
", DEC LR, CLREOL
Gimbal Joystick with Adapter (#27808)
The BASIC Stamp Editor
v1.2 11/13/2019 Page 8 of 9

Advertisement

loading