From 45fe14575b45a81c136a684ae539e4ad15a60746 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Wed, 1 Mar 2017 14:50:17 +0100 Subject: [PATCH] add temperature to log file --- serial.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/serial.pl b/serial.pl index dd409e5..4f60390 100755 --- a/serial.pl +++ b/serial.pl @@ -41,8 +41,12 @@ while (1) { $chr++; $ascii =cut + + my $temp = `curl localhost:3000/temp.txt`; + $temp =~ s/\s+/ /gs; + #printf "%s %2d %s\n", time(), $len, $hex; - printf "%8.4f %6.2f %2d %s\n", $ts, $ts - $t, $len, $hex; + printf "%8.4f %6.2f %2d %s | %s\n", $ts, $ts - $t, $len, $hex, $temp; $t = time(); } } -- 2.20.1