forked from rm-hull/pifm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playPacket.sh
executable file
·46 lines (34 loc) · 893 Bytes
/
playPacket.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
##########
# playPacket.sh - Play packet wav files over the radio on a Pi Zero W
##########
# 44100 hz stereo (NOTE: divided sampling rate by two!)
#SAMP_RATE=22050
#FORMAT="stereo"
# 44100 hz mono
SAMP_RATE=44100
FORMAT="mono"
# Frequency in Megahertz (Mhz)
# E.G. 144.390 = Mhz FM (+/- a little offset...?)
#FREQ=144.39415 # EVER, EVER, ever so slightly low...
FREQ=144.394157 # Seems (visually on waterfall) properly centered
#FREQ=144.390 # Did *NOT* get decoded on direwolf...
#FREQ=102.3
# 44100 hz sample rate, 16-bit files -
# packet.16bit.wav
# NOTE: FOR NOW - DO NOT - raise the volume above 4!
VOLUME=4
echo
#for FREQ in 144.394 102.3
#do
for A in `ls packet*.wav`
do
echo "Playing file ${A} on ${FREQ} Mhz..."
cmd=`echo pifm $A ${FREQ} ${SAMP_RATE} ${FORMAT} ${VOLUME}`
echo "Command Line: [$cmd]"
$cmd
# sleep 2
done
#done
echo
exit 0