Skip to content

Instantly share code, notes, and snippets.

@goran-mahovlic
Created January 7, 2017 14:48
Show Gist options
  • Save goran-mahovlic/1b7934a2fda70c9370b696169a64a58d to your computer and use it in GitHub Desktop.
Save goran-mahovlic/1b7934a2fda70c9370b696169a64a58d to your computer and use it in GitHub Desktop.
#!/bin/sh
cat < /dev/ttyACM0 > /tmp/data.log &
while :
do
STR=$(tail -n 2 /tmp/data.log | awk NF)
curl --data "origin=LoGoMo&data=$STR" http://ukhas.net/api/upload
echo "Uploaded: $STR to ukhasnet, go to sleep for 1 min"
sleep 1m
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment