Get_gpio() help

Hello,

I am trying to work with the read_gpio() function that is found in the
dboard_iface.cpp file. I am trying to read the io_rx[15 - 0] pins on the
basic_rx daughterboard. I am able to read the pins using this function
one
time, but I am unable to continuously read the pins. Could anyone give
any
advise or help on how I could continuously read the pins? I was also
wondering if there is a read_gpio() function available in python? Thank
you
very much for your help and time.

Sam

View this message in context:
http://old.nabble.com/get_gpio()-help-tp34340767p34340767.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Thu, Aug 23, 2012 at 5:54 PM, Samuel I. [email protected] wrote:

Hello,

Thank you for your help Frederick. The problem that I am having is that I
don’t really understand how I can get the read_gpio() value into my python
code. Once I get the value to my python code, then I will be able to create
a loop that continuously reads the pins.

I’m not 100% sure, but I think all c++ files has to go through SWIG in
order to be used in python. Have you tried to importing the class?

example: from uhd import dboard_iface or imort dboard_iface
or something along those lines.

After importing you can probably run something like:

gpio_value = read_gpio( unit )

and that should give you your value. Perhaps someone that know this
better
can give a more complete answer.

Regards,

Frederick

On 08/24/2012 09:00 AM, Frederick L. wrote:

I’m not 100% sure, but I think all c++ files has to go through SWIG in
can give a more complete answer.

Thats the idea. You can call get_dboard_iface on the source or sink
object:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/include/gr_uhd_usrp_sink.h#n474

This is available in python or c++ and all the same function calls
should work.

-josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs