PTT is working now, added fmrds modulation
This commit is contained in:
2
modulations/fmrds.sh
Executable file
2
modulations/fmrds.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
arecord -q -c2 -t wav -f cd | sudo ./modulations/pifmrds -freq "$1" -audio -
|
BIN
modulations/pifmrds
Executable file
BIN
modulations/pifmrds
Executable file
Binary file not shown.
@ -1,37 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Pin logic
|
||||
#selecting pin
|
||||
|
||||
GPIO=19
|
||||
|
||||
# "Prepare" it, whatever that means, I just copied it from SO
|
||||
if [ ! -d /sys/class/gpio/gpio${GPIO} ]; then
|
||||
echo "${GPIO}" > /sys/class/gpio/export
|
||||
fi
|
||||
echo "in" > /sys/class/gpio/gpio"${GPIO}"/direction
|
||||
#!/bin/bash
|
||||
echo $1
|
||||
echo $2
|
||||
#arecord -q -c2 -t wav -f dat | sudo rpitx -f $1 -i- - -m $2 -s 48000
|
||||
|
||||
arecord -q -c2 -t wav -f dat | sudo rpitx -i - -m RF -f "$1" -s 48000
|
||||
|
||||
|
||||
|
||||
# old line
|
||||
#(while true; do cat sampleaudio.wav; done)
|
||||
# | csdr convert_i16_f \ | csdr fir_interpolate_cc 2 | csdr dsb_fc \ | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff \ | sudo sendiq -i /dev/stdin -s 96000 -f 430000000 -t float e6 -l
|
||||
|
||||
while true; do
|
||||
if 1 == "$(</sys/class/gpio/gpio"${GPIO}"/value)" ]; then
|
||||
arecord -q -f cd -r 44100 -c2 -D hw:0,7 -t raw | csdr convert_i16_f \ | csdr fir_interpolate_cc 2 | csdr dsb_fc \ | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff \ | sudo sendiq -i /dev/stdin -s 96000 -f "$1" -t float
|
||||
|
||||
# REMOVE THIS
|
||||
|
||||
else
|
||||
echo "Not pressed"
|
||||
|
||||
# do arecord -l or arecord -L to find your audio card and change hw:0,7 to the corresponding value
|
||||
# maybe i just need to extract this command and put it in a subprocess... 🤔
|
||||
|
||||
fi
|
||||
sleep .5
|
||||
done
|
||||
|
||||
# this should work
|
||||
# screen will probably be operated using python, so all we need to do there is to killall ssb.sh, then run a new one with new freq async subproc
|
||||
# usage: bash ssb.sh "freq"
|
Reference in New Issue
Block a user