reading 4 values from arduino

This commit is contained in:
2019-01-05 16:15:48 +01:00
parent dd359c9f82
commit 0826568604
6 changed files with 53 additions and 13 deletions

View File

@@ -1,10 +1,25 @@
#!/bin/bash
DEVICE="/dev/ttyACM0"
DATAFILE="foo.dat"
IMAGE="graphe.png"
NB_READ=1000
./t -n ${NB_READ} -d ${DEVICE} | tee -a ${DATAFILE}
gnuplot << __EOC__
set term png size 1024,512
set output "${IMAGE}"
set grid
set xdata time
set timefmt "%s"
set format x "%H:%M:S"
plot "${DATAFILE}" using 1:2 title "foo" with lines, \
"${DATAFILE}" using 1:3 title "bar" with lines, \
"${DATAFILE}" using 1:4 title "quux" with lines, \
"${DATAFILE}" using 1:5 title "booz" with lines
__EOC__
# display ${IMAGE}
for p in {0..15}
do
echo pass $p
./t ${DEVICE} | tee -a foo.dat
sleep 8
done