> I am new to GNURADIO environment.
> I want the flow graph that i am working with to turn ON and OFF with 5 sec
> of interval.
> I tried tb.start(), tb.wait(), tb.stop() and sleep(5).
> But that is not working.
> whenever I try to replace "tb.Run(True)" with any thing the program does not
> Any suggestion will be greatly appreciated.
You probably don't want to be toggling the flowgraph on and off
constantly like this, anyways. That's a very inexact way of handling
it. You'll want some kind of gating block that handles this more
But regardless, you're method for doing this wouldn't work, anyways,
since you have the order wrong. The start function is a non-blocking
call that starts the flowgraph working. The wait is a blocking call
that sits there and waits for the flowgraph to finish. In your code,
you're never getting past the wait stage. You'd want this instead:
sleep(5) # Let the flowgraph run for some amount of time.
tb.wait() # not really necessary, but makes sure the stop() call
propagates to all blocks before moving on.
sleep(5) # wait 5 seconds before doing anything (like in a while loop)
Like I said, this isn't the best way to be accurate about how long
things run and stop for, but it'll get you in the right direction.