Hi Folks, Bob,

On Sat, 25 Jan 2003 22:56:46 -0700, [EMAIL PROTECTED] wrote:

> Hi Bastiaan,

> On Sat, 25 Jan 2003 "Bastiaan Edelman, PA3FFZ"
> <[EMAIL PROTECTED]> writes:
>> A variety of electronic measuring instruments could be coupled to
>> arachne eg by using the game/printer/RS232 ports.
>> DOS is not dead, neither is BASIC ;-))

> Can you guys make some real simple (and real cheap) weather stations?

> I had a project where I wanted to monitor air and water temperature over
> time and have the computer keep track of all the information. I found
> some weather stations, but they were all about $300 (USD) and required
> Windows.

> I needed something real cheap for village horticulture projects. I also
> had thought that it would work by reading the ports, but it was all too
> far over my level of expertise.

> A DOS or BASIC program would be good, especially if it can be done with
> recycled hardware.

> Bob

theoretically (this means I never tested this) You can connect up to 4
PTC or NTC resistors to the joystick port. They should be available for
some cents in a well sorted radio shack. A analogue joystick has 2 built
in potentiometers and their resistance will vary depending of the
position of the stick between about 100kOhms and nearly zero.
So all You need to do is connecting the resistor You want to use as
temperature sensor to the joystick port and write little prog which
converts the data from the port to Your preferred temperature scale.

Here are the pin assignment for the joystick connector:
Pin 1,8,9,15 : +5 VDC
Pin 4,5,12   : GND
Pin 2        : Button 1
Pin 3        : Horizontal value of stick 1 
Pin 6        : Vertical    "    "    "   1 
Pin 7        : Button 2
Pin 10       : Button 3
Pin 11       : Horizontal value of stick 2 
Pin 13       : Vertical    "    "    "   2 
Pin 14       : Button 4

And here is how to read values from joystick port via INT $15 (available
from AT or better BIOS)
Function $84 (this has to be written to AH before invoking INT $15)
 Subfunction $00 (write to DX)
  returns stata of the buttons in reg. AL bits 4..7
 Subfunction $01 (write to DX)
 returns AX: horizontal pos. stick 1
         BX: veritcal   pos. stick 1
         CX: horizontal pos. stick 2
         DX: vertical   pos. stick 2

HTH, Regards Joerg


> -

> ________________________________________________________________
> Sign Up for Juno Platinum Internet Access Today
> Only $9.95 per month!
> Visit www.juno.com

-- Arachne V1.71;UE01, NON-COMMERCIAL copy, http://arachne.cz/

Reply via email to