summaryrefslogtreecommitdiff
path: root/async_fm_demod.py
blob: 4c291cdf74168cff802db5faef967757261fd6d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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())