summaryrefslogtreecommitdiff
path: root/async_fm_demod.py
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2018-04-12 13:13:18 +0300
committerYuval Adam <_@yuv.al>2018-04-12 13:13:18 +0300
commit85b9d43dda8404f2a13be60e04e1edb6618a09a9 (patch)
tree446cd2fd2edc8a3752a19c744414146e106e0479 /async_fm_demod.py
parent476dd7446c84d39c47f10773571babc70916dd79 (diff)
Cleanup
Diffstat (limited to 'async_fm_demod.py')
-rw-r--r--async_fm_demod.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/async_fm_demod.py b/async_fm_demod.py
new file mode 100644
index 0000000..4c291cd
--- /dev/null
+++ b/async_fm_demod.py
@@ -0,0 +1,16 @@
+import asyncio
+from rtlsdr import RtlSdr
+
+async def streaming():
+ sdr = RtlSdr()
+
+ async for samples in sdr.stream():
+ print(len(samples), samples[0], type(samples[0]))
+
+ await sdr.stop()
+
+ sdr.close()
+
+loop = asyncio.get_event_loop()
+loop.run_until_complete(streaming())
+