Jupyter Analog Input Example do not works

Applications, development tools, FPGA, C, WEB
Post Reply
SEUTec
Posts: 7
Joined: Fri Dec 26, 2014 8:32 am

Jupyter Analog Input Example do not works

Post by SEUTec » Sat Jan 26, 2019 4:07 pm

Jupyter Analog Input Example do not works:

I get:

singleInput = FPGA.analog_in(0)

---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-8-a16e9d6621c3> in <module>()
----> 1 singleInput = FPGA.analog_in(0)

/home/jupyter/RedPitaya/redpitaya/overlay/mercury.py in __init__(self, channel)
77 channel = self.channels[channel]
78 self.chn = self.dev.find_channel(channel)
---> 79 self.scale = self.chn.attrs['scale'].value
80
81 def read(self):

AttributeError: 'NoneType' object has no attribute 'attrs'

How can I solve this ?
A bug in the python library ?

Thanks.

jaimenms
Posts: 2
Joined: Mon Aug 12, 2019 4:18 pm

Re: Jupyter Analog Input Example do not works

Post by jaimenms » Fri Aug 30, 2019 6:52 pm

I have the same problem. Any help?

jaimenms
Posts: 2
Joined: Mon Aug 12, 2019 4:18 pm

Re: Jupyter Analog Input Example do not works

Post by jaimenms » Sat Aug 31, 2019 6:05 pm

I found the problem.

The class analog_in in mercury.py module the slow analog device using an index:

dev = ctx.devices[3]

In my case, the slow analog input is not the "3" but "2". I think the best approach is to access it by the device name.

After some tries I changed it to:

dev = ctw.find_device("iio:device1")

And it worked.

I think I will study the mercury.py before I use it.

Please let me know if it worked for you.

Post Reply
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie

Who is online

Users browsing this forum: No registered users and 2 guests