#!/usr/local/bin/perl # # This script gets the current temperatures from all specified probes # on a "Hot Little Therm" and writes out to a log file. # # By: Theo Van Dinter # # Log format: # time{:probe temp} # # time is the number of seconds since epoch (time()), following is any # number of ":probeID temp" sections (as many probes as you have). # use strict; my($hlt) = 1; # number of probes to check my($device) = "ttyS0"; # which device (under /dev)? my($logfile) = "/home/tvd/hlt/hlt.log"; # -- Do not edit below this line -- # my(@temps) = (); MAIN: { my($rin,$win,$ein,$num,$text); open(T,"+>$logfile") || die "Can't append $logfile:$!"; print OUT time,"$line\n"; close(OUT); }