projects
/
air-quality
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 2:
6009610
)
Merge branch 'master' of mjesec.ffzg.hr:/git/air-quality
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 4 Feb 2020 18:30:44 +0000
(19:30 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 4 Feb 2020 18:30:44 +0000
(19:30 +0100)
audio.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/audio.sh
b/audio.sh
new file mode 100755
(executable)
index 0000000..
cb7e9f5
--- /dev/null
+++ b/
audio.sh
@@ -0,0
+1,10
@@
+#!/bin/sh
+
+while true ; do
+
+arecord -d 1 -r 96000 /dev/shm/tmp.wav
+time=`date +'%s%N'`
+info=`sox /dev/shm/tmp.wav -n stat 2>&1 | sed -e 's/(.*)//' -e 's/: */=/' -e 's/ */_/g' | tr '\n' ',' | sed 's/,$//'`
+curl --silent -XPOST http://10.60.0.92:8086/write?db=rot13 --data-binary "fan,dc=trnjanska $info $time"
+
+done