#!/usr/local/bin/perl # # This script gets the current temperatures from all specified probes # on a "Hot Little Therm" and reports it to the console. # # By: Theo Van Dinter # use strict; my($hlt) = 1; # number of probes to check my($device) = "ttyS0"; # which device (under /dev)? my(%info)=( # information about specific probe IDs (location, etc.) "10acbd2000000009" => "by einstein", "105dcd2000000021" => "by toasters", "104ec2200000004c" => "output ac", "1058af2000000058" => "compressor output vent", "1090cf2000000077" => "by yocto", "100cbf20000000d6" => "intake ac", ); # -- Do not edit below this line -- # my(@temps) = (); MAIN: { my($rin,$win,$ein,$num,$text); open(T,"+ Farenheit. my($tmp) = sprintf "%3.1fC = %3.1fF", $tempc, $tempf; # temp line # print me! printf "%-16s %-15s %-s\n",$probe,$tmp,$info{$probe}; } print "\n"; }