discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] help w/ simple AM tx program


From: Josh Marcus
Subject: [Discuss-gnuradio] help w/ simple AM tx program
Date: Sat, 12 Nov 2005 12:56:26 -0500
User-agent: Mutt/1.5.5.1+cvs20040105i

Hey there,

I'm trying to create some simple transmitter programs as a basic
tutorial for myself, and I was wondering if someone would take a 
quick look at my maximally simple AM transmitter program (just 
trying to transmit a tone) and tell me where I've gone wrong.

Here's the program:

from gnuradio import gr
from gnuradio import audio
from gnuradio import usrp
from gnuradio.eng_option import eng_option

def build_graph ():
    fg = gr.flow_graph ()

    sampling_freq = 8000;
    src1 = gr.sig_source_f ( sampling_freq, gr.GR_SIN_WAVE, 1090000, 4000000 )
    src2 = gr.sig_source_f ( sampling_freq, gr.GR_SIN_WAVE, 600, 14000 )
    dst = audio.sink (int (sampling_freq))
    mixer = gr.multiply_ff()
    fg.connect (src1, (mixer, 0))
    fg.connect (src2, (mixer, 1))
    f2c = gr.float_to_complex ()
    fg.connect ( mixer, ( f2c, 0 ) );
    usrp_interp = 400
    u = usrp.sink_c (0, usrp_interp)
    fg.connect(f2c, u)
    return fg

def main():
    fg = build_graph()
    fg.start()
    raw_input("Hit Enter to quit: ")
    fg.stop()

if __name__ == '__main__':
    main ()




reply via email to

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