One of the advantages of the WIB is that you can customise it by designing your own website if you wish. For the purposes of this article though, we’ll assume that you know the basics of website design. Instead, we’ll just give a few basic pointers on dynamic content and running CGI (Common Gateway Interface) commands.
Designing your own website
Basically, it’s up to you whether you use the website we have provided with the WIB or one of your own design. It’s just a matter of copying the website you wish to use to the memory card.
There are plenty of HTML introductory tutorials on the web. Also you can use a freeware HTML WYSIWYG (What You See Is What You Get) editor such as Kompozer which you can download from http://kompozer.net
We used Kompozer to design the website provided with the WIB and you can change all its important settings if necessary.
The WIB implements a simple system for dynamic content.
For dynamic pages, a string of the form ~XX, where XX represents a hexadecimal code between 00 and FF, is replaced by the value of that variable. Table 2 on the SILICON CHIP website gives a list of the hexadecimal codes and their corresponding variables.
Note that the files which are emailed are also considered dynamic content. For example, let’s say that we have a dynamically typed file containing the text:
Note: the three tables referred to in the text (Tables 1-3) are too large to include in this article. Instead, you can download them in PDF format from the SILICON CHIP website. You’ll find them in the downloads section for Jan 2010.
The ~1E is currently ~D0 degrees.
From this, it follows that if the name of Variable 0 is set to “Temperature” and the current value for the temperature (derived from a temperature sensor connected to the first ADC input) is 26.5, then this would appear as:
The Temperature is currently 26.5 degrees.
As mentioned, any files sent by email, such as var0max.txt (on a maximum condition in variable #0), can also contain dynamic content. In order to show the ~ character you need to escape it by using the sequence ~~.
For example ~~02 will translate to ~02 yet ~02 will translate to the Subnet Mask (refer to Table 2).
The default var0max.txt file contains the following text:
The ~1E is currently at ~D0, which is above the set maximum of ~1C!