home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
control
/
homecon
/
gameport.doc
< prev
next >
Wrap
Text File
|
1989-12-16
|
8KB
|
203 lines
------------------------------------------------
Game Port Monitor Version 2.0
Copr. 1989 by Taegan D. Goddard
------------------------------------------------
I. Introduction
------------
Have you ever wondered what else your computer could do?
Word Processing, spreadsheets, and data bases are fine -- but
wouldn't it be nice if your investment in hardware would pay for
itself in other ways? Personal computers are now being used for
home and office control. Scientists use them to monitor
experiments. The Game Port Monitor allows you to hook up sensors
to your machine's game port so that you can begin to experiment
with environmental monitoring.
o Measure light intensity in a room.
o Monitor windows and doors in your home.
o Measure temperature.
o Observe human movement through open spaces.
Each of these things can be accomplished with your PC! Add a
computer interface for the BSR X-10 wireless appliance and light
modules, and you have the beginnings of a mini home control
system! With the PC game port and a few inexpensive electronic
components, you can add real-time environment sensing to your own
programs!
Let the Game Port Monitor lead you into this exciting (and
relatively un-tapped) world of computing...
II. But What does it cost?
----------------------
The range of electronic components you can attach to the
PC's game port are many -- from simple photocells and thermistors
to more complex infrared motion detectors. Less than $5 spent at
an electronics store can buy all that you need to measure light
intensity and temperature. A very small price to pay to equip
your computer with 2 human senses!
Likewise, the software is also very inexpensive. The Game
Port Monitor, a shareware program (it's not free!), costs just
$5. Please send a check for $5 to:
Taegan D. Goddard
35 Woodside Circle
Hartford, CT 06105
to register your copy of the program. You will be sent future
updates of the program and additional tips for environmental
monitoring and home control. (I am also currently working on a
mini home control program using the BSR X-10 controller for
output and the PC game port for input.)
Please send any comments you may have about this program -
your input will help me create better updates!
III. Function Key Assignments - Game Port Monitor
---------------------------------------------------
<F1> Calls up the help screen, listing all of the following
key assignments.
<F2> Graphs all incoming data from the transducers attached
to the analog inputs of the game port.
<F3> Shows program status: Time monitoring started, current
time, total number of observations, and average
observations made each second.
<F4> Begin saving incoming data to a file every 15 seconds.
All data is saved in a file named GAMEPORT.DAT. This
data can be imported into your spreadsheet or data base
program for further analysis.
<F5> Stop saving data to disk file.
<F6> Turn off screen display in order to prevent monitor
burn problems. Often you will want to leave your
computer on for a long period of time to monitor
certain inputs. This option can be used to prevent
damage to your monitor (or to stop prying eyes!)
<F7> Clear lower portion of screen. Shows only the actual
data boxes for analog and digital inputs, turning off
any other information screen at the bottom of the
display.
<F8> Refresh Screen Display. Left over from earlier versions
of the program where certain interrupts caused problems
with the screen display. The bugs have been fixed in
this version of the program, but someone may still want
to use it!
<F9> Exit to the DOS prompt. Allows user to rename data
file, or perform any other needed task outside the
program, like using your word processor or spreadsheet.
<F10> Exit Game Port Monitor. Ends monitoring session.
IV. Pin Locations on the PC game port
---------------------------------
The following chart shows all pin assignments on the PC game
port:
PIN LOCATIONS - PC GAME PORT
----------------------------------------------------------------
Pin # Pin Function
----------------------------------------------------------------
1 +5 volts
2 DIGITAL #1
3 ANALOG #1
4 GND
6 ANALOG #2
7 DIGITAL #2
8 +5 volts
9 +5 volts
10 DIGITAL #3
11 ANALOG #3
12 GND
13 ANALOG #4
14 DIGITAL #4
15 +5 volts
----------------------------------------------------------------
NOTE: It is always safest to turn off your computer when
making connections to the game port.
V. How do I hook up sensors to my PC's game port?
----------------------------------------------
The joystick is a typical device you would attach to the
PC's game port. It has two variable resistors attached to the
analog inputs, each corresponding to the X or Y axis. The buttons
on the joystick are digital inputs. Each can only be ON or OFF.
If you have a joystick, use the Game Port Monitor to find out
what your joystick actually does...
ANALOG INPUTS:
A photocell (light sensor) or thermistor (temperature
sensor) has two leads coming from it. Each essentially acts as a
variable resistor - the resistance of the device changes as the
temperature or light changes. Attach one lead to +5 volts and the
other to an analog input pin on the game port. That's all there
is to it...
The Game Port Monitor will now show a reading from 0-255
corresponding to the resistance of the device. If you are using a
thermistor, you can calibrate these readings to an actual
temperature reading. Submerge the thermistor in a pan of boiling
water. The reading Game Port Monitor gives you corresponds to 100
degrees centigrade. Do the same with a pan of ice cold water, and
you have the reading for 0 degrees centigrade. Most thermistors
give linear readings over this temperature range, so you can
figure out all points on the line, and thus the temperature for
any reading the program gives you.
DIGITAL INPUTS:
Any kind of switch, such as a relay contact on a motion
sensor, can be used with the digital inputs. Connect one lead to
the digital input pin on your PC's game port and the other to a
Ground (0 volts).
The Game Port Monitor gives you a reading telling the ON/OFF
status of the switch. With a magnetic type burglar alarm switch
you can sense whether a door or window is open or closed.
Once you have found out how to give your computer sensing
capabilities, you can write programs exploiting this new found
ability of your computer. Register your copy of the Game Port
Monitor and you'll be part of a forum concerned with these types
of experiments and home control. The Game Port Monitor will
simplify your learning process and instantly show you what your
sensors are doing.
Look for PC-ROWER.ARC on your local BBS. This program lets
you computerize your rowing machine! Many more programs of this
type will follow.
VI. Etc.
---
I make no warrantee or guarantees for the use of this
software or the hook-up of devices to your computer. Attaching
simple electronic components such as light and temperature
sensors is a relatively easy operation to complete, and poses
very little risk to your equipment, BUT if you are in doubt of
your skills then please get assistance or have someone else do
the connections for you.
Thank you in advance for your support of the shareware
concept!