DD2-monitor/serial/essai.sh

30 lines
615 B
Bash
Raw Normal View History

2019-01-05 21:47:51 +11:00
#!/bin/bash
2019-04-04 01:25:38 +11:00
DEVICE="/dev/ttyACM1"
2019-01-06 02:15:48 +11:00
DATAFILE="foo.dat"
2019-01-07 07:17:33 +11:00
TMPFILE="/tmp/dd2data"
2019-01-06 02:15:48 +11:00
IMAGE="graphe.png"
2019-04-04 01:25:38 +11:00
NB_READ=500
2019-01-06 02:15:48 +11:00
2019-03-28 07:52:16 +11:00
./t -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
2019-01-06 02:15:48 +11:00
gnuplot << __EOC__
2019-04-04 01:25:38 +11:00
set term png size 3200,640
2019-01-06 02:15:48 +11:00
set output "${IMAGE}"
set grid
2019-01-29 00:42:33 +11:00
set title "Temperature dans le Double Dragon 2"
2019-01-06 02:15:48 +11:00
set xdata time
set timefmt "%s"
2019-02-24 02:40:02 +11:00
set format x "%d, %H:%M"
2019-02-23 03:25:24 +11:00
set yrange [ 0.0 : 30.0 ]
2019-01-07 07:17:33 +11:00
plot "${DATAFILE}" using 1:2 title " foo" with lines, \
"${DATAFILE}" using 1:3 title " bar" with lines, \
2019-01-06 02:15:48 +11:00
"${DATAFILE}" using 1:4 title "quux" with lines, \
"${DATAFILE}" using 1:5 title "booz" with lines
__EOC__
2019-03-28 07:52:16 +11:00
#<23>display ${IMAGE}
2019-01-06 02:15:48 +11:00
2019-01-05 21:47:51 +11:00