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.
Jupyter Analog Input Example do not works
-
- Posts: 2
- Joined: Mon Aug 12, 2019 4:18 pm
Re: Jupyter Analog Input Example do not works
I have the same problem. Any help?
-
- Posts: 2
- Joined: Mon Aug 12, 2019 4:18 pm
Re: Jupyter Analog Input Example do not works
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.
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.
-
- Posts: 1
- Joined: Tue Aug 25, 2020 5:41 pm
Re: Jupyter Analog Input Example do not works
It works for me too, jaimenms! Thank you!
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: Google [Bot] and 38 guests