Również chciałem przedstawiś wykres temp na wykresie więc
opkg update
opkg install gnuplot
stworzyłem plik pomiar.sh
o zawartości:
#!/bin/sh
GNUPLOT_COMMAND="/tmp/gnuplot_cmd"
touch ${GNUPLOT_COMMAND}
cat > ${GNUPLOT_COMMAND} << __EOF__
set terminal png small size 800,500
set output '/tmp/temp.png'
set title "Wykres temperatury"
set xlabel "godzina"
set timefmt "%Y-%m-%d %H:%M:%S"
set xdata time
set ylabel "temperatura °C"
set format x "%H"
set grid
set key left
plot '/tmp/temp.txt' using 1:3 t 'dane rzeczywiste' with lines lt 1
quit
__EOF__
gnuplot ${GNUPLOT_COMMAND}
rm ${GNUPLOT_COMMAND}
potem
chmod 755
i coś nie działa mówi że w 5 lini jakiś byk
BusyBox v1.19.4 (2012-06-20 14:04:41 CEST) multi-call binary.
Usage: touch [-c] FILE [FILE]...
Update the last-modified date on the given FILE[s]
-c Don't create files
/bin/pomiar.sh: line 5: can't create : nonexistent directory
G N U P L O T
Version 4.6 patchlevel 0 last modified 2012-03-04
Build System: Linux mips
Copyright (C) 1986-1993, 1998, 2004, 2007-2012
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Terminal type set to 'unknown'
gnuplot>
Co mam nie tak?