Parallax 28560 Manual page 8

Mouse sensor kit
Table of Contents

Advertisement

Then upload the PBASIC program, and start the .exe. Once the program finds the Mouse Sensor output,
you will see a display that looks like this:
The green dot keeps track of the sensor's current X and Y position. The dX and dY strip charts track the
sensor's instantaneous change in position. If you move the sensor too fast, a message that says
"OVERFLOW" will display. The background grid spacing is 250 sensor pixels. The default resolution for
the PBASIC program is about 500 d.p.i., which works out to 1/2" of travel per division.
One thing that quickly becomes obvious from using this program is that, while the Mouse Sensor is very
good at tracking relative motion, it does accumulate small errors when keeping track of absolute position.
To demonstrate this, make a small mark at the sensor's current location, and reset the BASIC Stamp to
zero the position. Then move the sensor around on the surface, and return to the starting point. Is the
reported position (0, 0)?
Propeller
To test the Mouse Sensor with the Propeller chip, wire it as shown above. Then upload the program
MouseSensorMonitor.spin shown at the end of this document and downloadable as an archive from
the Mouse Sensor product page. It makes use of the MouseSensor object, which can also be found in
the
Propeller
Object
Exchange
(obex.parallax.com).
It
is
designed
to
be
used
with
the
mouse_monitor.exe program, as shown above. You will find it to be a lot more responsive with the
Propeller than with the BASIC Stamp.
Copyright © Parallax Inc.
Mouse Sensor Kit (#28560)
v1.0 6/1/2010 Page 8 of 18

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 28560 and is the answer not in the manual?

Table of Contents