[ asTemp ]

a Temperature Indicator

more to come soon...

History
Well, I wanted to make a little thingy to put into my Wharf. And there it was. A brand new temperature indicator.
Version 0.01
First release.

Version 0.02
Some minor changes.

About astemp
Astemp is a temperature indicator to put into your Wharf. It's designed to use with AfterStep, but it's possible to use it alone.

[astemp] Let's connect a temperature indicator to all Linux boxes all over the world to see what temperature the users have when they are hacking away on their Linux ;-)

Note To measure the temperature on your own computer you also need some other applications, a thermistor and a game port: * Download: astemp-0.02.tar.gz.

The kernel module
The kernel module reads data from the game port and gives the temperature on four devices, /dev/tw0, /dev/tw1, ... The temperature given on this devices is ten times the original temperature. This is because we want to use integers to represent the value, and we have a 0.1°C resolution.

To install this driver you'll have to type:

# insmod tempwatch.o

This module is made against kernel 2.0.30 and may contain bugs... I don't think it will coexist with the joystick device because they use the same hardware address. Maybe I'll have to make a workaround here.

The devices use major 42 and minor 0-3. This is development numbers and should probably not be used worldwide. But I haven't got any numbers to use to this device so I use this for now. Maybe they get their own number when/if it can coexsist with the joystick device...

* Download: tempwatch-0.02.tar.gz.

The temperature daemon
The temperature daemon reads data from the kernel module, corrects span and offset, and sends the data to all clients trying to connect to the port (standard 1200). If you want to get the temperature from the probe attached to port 0, you just send the value 0 to the daemon and it will return the correct temperature for this probe (multiplied with ten because of the integers), a 255 bytes long info string, and four integers telling the geographical position.

If you use a non-default¹ temperature probe you have justify span and zero for that probe. It's not as difficult as it seems, it just takes some time :-) Here is a short drawing describing the values:

      <---------------- Span ----------------->

      |---|---|---|---|---|---|---|---|---|---|       Temperature
    -50.0                0.0                 50.0
                           
       \---  Zero

    
The span value is used to tell the distance from bottom to top temperature. The zero value is used to justify the zero point.

¹ non-default means another probe than I use.

* Download: tempd-0.02.tar.gz.

The NTC thermistor
You'll need a ~200kOhm thermistor and a game port.
               p2    p1  +5V
                |     |   |                     15 pins D-SUB.
            o o o o o o o o <- pin 1   
             o o o o o o o                 Thermistors:
                 |   |                        +5V ---NNN--- p1
                p4  p3                        +5V ---NNN--- p2
    
Connect probe one to +5V and p1 (inside), and probe two to +5V and p2 (outside). Then you put the plug into the game port, insmod tempwatch.o and run tempd. Voila, and you have you're own temperature measurer to distribute the temperature world over.

Sites running tempd
Currently I don't know anyone else running tempd. (because no one knows about it yet, I suppose :-) But when they show up I'll put them up here if they want...

HostPort WhereProbes Admin
gadid.tihlde.hist.no1200 Trondheim, Norway2 Stig Bjørlykke

More to come
The plan is long and I haven't written everything down yet. But some of my ideas are:

Compile errors / Bugs
Well, I don't know anything about bugs, and my programs may be full of them. Please let me know if you find any.


Linux
Stig Bjorlykke
Last modified: Mon Nov 10 20:07:51 CET 1997