Sarian Basic 1-Wire Support Library
===================================

This folder contains example scripts that use the
Basic 1-Wire API. They are described below.

8540tst.sb   - this example reads temperature and humidity from
               a TAI8540 humidity sensor

8558tst.sb   - this example monitors the DS2408 8 port switch device
               on a TAI8558 I/O module, and sets the relay outputs
               to match the corresponding inputs

8558rlys.sb  - this example turns on and off all the relays
               on a TAI8558 I/O module.

8590tst.sb   - this example writes the current time to a TAI8590
               LCD display driver board. This board contains a
               DS2408 8 port switch which is used to send data to
               the LCD.

adtest.sb    - uses 1wire20.sb to read the voltages from an A/D
               converter device

asytst.sb    - this tests the i/o to the 1-Wire pod. Note that the
               test normally takes about 90 secs during which time
               the POD ready light should flash steadily on and off.

cntrtst.sb   - uses 1wire1D.sb to read the counter values from a
               counter device

gpstemp.sb   - uses 1wire10.sb and 1wireGPS.sb to read from a GPS
               receiver and a 1-Wire temperature device

scan.sb      - this scans the devices on the 1 Wire bus and displays
               the devices found

switchtst.sb - uses 1wire12.sb and 1wire10.sb to report the state
               of a switch device. It also reports the temperature
               if such a device is detected.

templcd.sb   - this program checks the temperature every 30 secs and
               displays the current temperature/time on an LCD connected to a
               TAI8590 board. This board contains a DS2408 switch device.
               A log of the temperature readings is kept in a RAM file called templog.txt.
               The last reading is also written to MIB variable bas.0.userstring2
               with a timestamp in bas.0.userstring1. These may be viewed by typing
               "at\mibs=bas" or by loading the web files "tempweb.asp" and "tempweb1.asp".
               Note: to stop the program, use the command "basic 0 kill"

tempmon.sb   - uses 1wire10.sb to monitor the temperature and sends
               an email if a change is detected. This example also demonstrates
               the use of a RAM file to log data and the use of MIB variables.
               Two related web files, tempweb.asp and tempweb1.asp may be loaded
               onto the Sarian: tempweb.asp may then be used to view the current
               MIB values and the logfile.

tempweb.asp
tempweb1.asp - see tempmon.sb and templcd.sb

temptest.sb  - shows how to use high resolution temperature calculation

weather.sb   - displays the current temperature, wind speed and direction from
               the devices on a 1 wire weather station. This example requires the
               data file called "winddata.txt". This script also updates MIB
               variables which may be viewed using "weather.asp". A logfile
               called templog.txt (as a RAM file) is updated whenever the
               temperature changes. The web files weather.asp and weather1.asp
               should both be loaded onto the Sarian.

weather.asp,
weather1.asp - see weather.sb

winddir.sb  - displays the wind direction from the voltages read from an
              A/D converter in a 1 Wire weather station. This example
              requires the file "winddata.txt". NOTE: for the ER2110
              the file winddat1.txt should be used, and renamed to
              winddata.txt.
