discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] GRC: Serial Port to Block Diagram Interface


From: Martin Juhl Jorgensen
Subject: Re: [Discuss-gnuradio] GRC: Serial Port to Block Diagram Interface
Date: Tue, 23 Feb 2010 13:35:33 +0100

Using the same example as a base

This is the portion of the code I am using (from probe.py) to insert messages into the queue:
....
         arr = numpy.array(random.random(), numpy.float32)
return gr.message_from_string(arr.tostring(), 0, gr.sizeof_float, 1)
         self._msgq.insert_tail(msg)
....


I was also seeing nothing on the scopes, but

If you are having issues with the plotters, make sure that the samples rates match up, that can cause issues because the plotters try to decimate to achieve frame rate.

helped and matching the rates fixed the issue.

I have successfully added a serial connection using the same approach, but there are some type casting/wrapping issues: the above approach uses a numpy array to convert an int/a float into the binary reprensentation. So to read a number from the serial connection involves parsing the ASCII -> number (int/float) -> binary format.

But what about the other formats available?

Byte/char is easy, as it is just to pass the correct amount of bytes to the msg queue, but how do I represent e.g. complex signals in binary?

- Martin




reply via email to

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