So i have Arduino UNO with few sensors. I want to read sensors from serial and save them to file in debian/linux.
I have my way to get it working but the problem is that everytime i read it the arduino resets.
Can someone gimme a hand on making a better script to read it without resetting it.
Im now doing it with this:
#!/bin/sh
#double because the first line is double from 1-wire sensors
/usr/bin/head -n5 /dev/ttyUSB0 > /root/lammot.dat
/usr/bin/head -n5 /dev/ttyUSB0 > /root/lammot.dat
if test -s /root/lammot.dat; then
echo OK!
cp /root/lammot.dat /root/arvot.dat
else
echo tiedosto tyhjä
exit
fi
# update graphs
/root/lue_ja_paivita_kuvat
/root/valo/lue_ja_paivita_kuvat
/root/kosteus/lue_ja_paivita_kuvat