[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reporting Data 1-Way-Out?



On May 15, 9:01 am, "Steve ][" <sc...@hotmail.com> wrote:
> Yes, fun (and young child teaching) is the key for this exercise. And
> I "misspoke" when I said joystick port, which would make anyone think
> I meant the 9-pin thing; I did mean the 16-pin port. I'm going to work
> exclusively on a IIGS running GS/OS and code in Complete Pascal.

In this case, Michael gave you the code, just change it to Pascal and
decide how you want to display the temperature.  A simple thermistor
is all you need; Jameco (www.jameco.com) has them, they are very
cheap.  Look for one with a room temperature resistance around 100k.
Hook it up as you would the paddle itself.  The resistance of a
thermistor does not vary linearly with temperature.  The simplest
thing to do will be to calibrate it at different temperatures with a
separate thermometer.  The relationship should be exponential so that
if you plot the points on log paper you'll get a straight line which
you can then do an eyeball best fit to and use that for your
calibration (ie, to change x into y in Michael's code above).  Or, if
you have access to a curve fitting program you can fit the actual form
of the function, it will be in the thermistor data sheet.

Once you have measurements you can do as you like with them:  display
them on the II, store them to disk, send them out the serial port,
etc.  If you want to send to a PC which is connected to the net you
can use the serial port and then on the PC side I'd suggest a simple
Python program using the pyserial module to read it.  Python can then
create HTML pages and you'll be able to see the temperature from
anywhere.

Kudos for teaching your son with this project!  Keep us posted on how
it is going.

Ron