ThermIIC – My Sidebar

Since I've recently been trying out Mozilla / Netscape 6 (pre-release) it occurred to me that weather / temperature indication could be a good candidate for a ‘My Sidebar’ tab. It doesn't need to take up much screen area, and it's the sort of thing that's nice to keep one eye on whilst looking at other pages.

There really isn't much involved in providing a tab. Tabs are simply ordinary web pages, but designed to be useful in the very small area usually occupied by a tab. But even in just 140 pixels, or thereabouts, you can quite usefully present a table of numerical data or a thumbnailed plot.

So I set about adapting a CGI program I had already, paring the output down to the bare minimum. This program reads temperatures from up to eight DS1624 (or ’75-series) I²C thermometers connected to a RISC OS machine, collected by ThermIIC. It could just as well plot weather data. Since I've not got an Internet-accessible RISC OS server at present, I've collected together some sample CGI output for you to see, here (normal browsing link).

In this version (updated 14/8/0) the Tab contains a table of the latest values read from the active sensors (only 2 of the possible 8 in this case), a thumbnail plot of the available data, and links to three other data sets, averaged over 10, 100 and 1000 samples. The thumbnail plot is linked to a full-size version. Having set ‘TARGET="_content"’ in the link means that this comes out in the main browser window. Note that these examples are real CGI-generated pages, collected by pavuk. I just changed the filenames (and links) to store them nicely.

To get a tab added to ‘My Sidebar’ you need a button with a little bit of ‘magic’ JavaScript. Look at the source of this page for an example. Here's the button to add my example as a tab:

It's easy enough to remove it after, by going to ‘My Sidebar -> Add -> Customize Sidebar…’.

You can find more information on creating Tabs at the Developer’s Guide.

The CGI program (for RISC OS only) and C source are available from the downloads page. Note that this is still under development. You will need thermpng as well.

go back Return to projects page
SJM home Simon’s home page