This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rtlsdr | |
import numpy as np | |
from scipy import signal | |
# Connect to the SDR and configure it | |
sdr = rtlsdr.RtlSdr() | |
sdr.sample_rate = 2.4e6 # 2.4 MHz sample rate | |
sdr.gain = 'auto' | |
# Define the frequency ranges to scan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import os | |
import time | |
import sys | |
os.system("pkill rtl_fm") | |
FM_frequency = "103.3e6" #desired FM station | |
#FM_frequency = sys.argv[1] + "e6" | |
modulation_mode = "wbfm" #wideband FM | |
sample_rate = "200000" #lowpass/resample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import json | |
import subprocess | |
import os | |
def run_script(button): | |
os.system("pkill rtl_fm") | |
command = "rtl_fm -A lut -E deemp -f {} -M {} -s {} -r {} - | ffmpeg -nostats -loglevel quiet -r 200k -f s16le -ar {} -ac 1 -i - -f wav - | aplay -q -t wav > /dev/null 2>&1".format( | |
button["frequency"], button["modulation_mode"], button["sample_rate"], button["output_rate"], button["output_rate"]) | |
subprocess.Popen(command, shell=True, |
OlderNewer