My Arduino is recording temperature data (datatype float), which I'm trying to log on my Linux machine. The big problem is the speed of this logging. The Arduino uses a DS1822 to read the temperature, after which I use the
while [ 1 ]; do
echo "$val,$(date "+%Y-%m-%d %H:%M:%S")" >> ~test.txt;
I found the solution by disabling the autoreset that the Arduino is performing when a new serial connection is established. To do so, I placed a 10 uF capacitor between RST and GND. Please note that this capacitor has to be removed before uploading code to your Arduino!
After making this modification, I was able to read resistance data at 10 Hz from my Arduino. To do so, the only thing I modified was the sleep command on the bash script, which is now