Skip to content

Instantly share code, notes, and snippets.

@nobro
Created November 2, 2014 07:10
Show Gist options
  • Save nobro/dbe7e8f36f5db9ec842d to your computer and use it in GitHub Desktop.
Save nobro/dbe7e8f36f5db9ec842d to your computer and use it in GitHub Desktop.
Read temperature and humidity using DHT22 from seeeduino v3 on USB
INPUT=$(grep -m 1 Humidity /dev/ttyUSB0)
NOW=$(date)
if [ "$INPUT" != "Binary file /dev/ttyUSB0 matches" ]; then
echo "$NOW" "$INPUT" >> /home/nob/temp.txt
else
exit 0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment