2019-01-05 21:47:51 +11:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
DEVICE="/dev/ttyACM0"
|
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-01-13 03:49:41 +11:00
|
|
|
|
NB_READ=15000
|
2019-01-06 02:15:48 +11:00
|
|
|
|
|
2019-01-13 02:26:15 +11:00
|
|
|
|
./t -v -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
|
2019-01-06 02:15:48 +11:00
|
|
|
|
|
|
|
|
|
gnuplot << __EOC__
|
2019-01-07 07:17:33 +11:00
|
|
|
|
set term png size 1600,512
|
2019-01-06 02:15:48 +11:00
|
|
|
|
set output "${IMAGE}"
|
|
|
|
|
set grid
|
2019-01-14 01:34:27 +11:00
|
|
|
|
set title "Dans le Double Dragon 2"
|
2019-01-06 02:15:48 +11:00
|
|
|
|
set xdata time
|
|
|
|
|
set timefmt "%s"
|
2019-01-07 07:17:33 +11:00
|
|
|
|
set format x "%H:%M:%S"
|
2019-01-13 03:49:41 +11:00
|
|
|
|
set yrange [-5.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__
|
|
|
|
|
|
|
|
|
|
# display ${IMAGE}
|
|
|
|
|
|
2019-01-05 21:47:51 +11:00
|
|
|
|
|