summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--async_fm_demod.py (renamed from fm.py)12
-rw-r--r--asynciotest.py8
2 files changed, 1 insertions, 19 deletions
diff --git a/fm.py b/async_fm_demod.py
index dc8df68..4c291cd 100644
--- a/fm.py
+++ b/async_fm_demod.py
@@ -1,24 +1,14 @@
import asyncio
from rtlsdr import RtlSdr
-RATE_IN = RATE_OUT = 170000
-RATE_OUT2 = 32000
-CUSTOM_ATAN = 1
-DEEMPH = 1
-SQUELCH = 0
-
async def streaming():
sdr = RtlSdr()
async for samples in sdr.stream():
- # do something with samples
- # ...
- print(len(samples), samples[0])
+ print(len(samples), samples[0], type(samples[0]))
- # to stop streaming:
await sdr.stop()
- # done
sdr.close()
loop = asyncio.get_event_loop()
diff --git a/asynciotest.py b/asynciotest.py
deleted file mode 100644
index f588a22..0000000
--- a/asynciotest.py
+++ /dev/null
@@ -1,8 +0,0 @@
-import asyncio
-
-async def echo():
- pass
-
-if __name__ == '__main__':
- loop = asyncio.get_event_loop()
- loop.run_forever(echo())