[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] detecting frequency with gr.goertzel_fc() in python

From: Casey Halverson
Subject: [Discuss-gnuradio] detecting frequency with gr.goertzel_fc() in python
Date: Mon, 12 Oct 2009 17:38:48 -0700

Hello, I have written a few static blocks in python, but i am still very much a beginner.

I want to be able to detect frequency of a single tone in gnuradio. I have read that perhaps gr.goertzel_fc() is something I should use. However, the documentation is very vague and I am unsure how exactly I should even start using it, what 'len' means in its arguments, how i connect something to it, and what it outputs. I am wondering if someone can point me in the right direction. I have written a small test script using a sine wave generator as an example. the end goal is to detect various tones to input into a state machine using the USRP.

Thank you!


#!/usr/bin/env python

from gnuradio import gr
from gnuradio import audio
import time

class my_top_block(gr.top_block):
    def __init__(self):
        sample_rate = 32000
        ampl = 0.1
src1 = gr.sig_source_f (sample_rate, gr.GR_SIN_WAVE, 1200, ampl)
        det = gr.goertzel_fc(32000,100??,1200)
        self.connect (src1, det, ????)

if __name__ == '__main__':
    except KeyboardInterrupt:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]