MRAA ADC
Hannibal
New Member Posts: 4 ✭
I get the following error when trying to use MRAA to read from ADC:
Traceback (most recent call last):
File "adc_test.py", line 7, in <module>
x = mraa.Aio(7)
File "/usr/lib/python2.7/dist-packages/mraa.py", line 1680, in __init__
this = _mraa.new_Aio(pin)
ValueError: Invalid AIO pin specified - do you have an ADC?
Please help.
Traceback (most recent call last):
File "adc_test.py", line 7, in <module>
x = mraa.Aio(7)
File "/usr/lib/python2.7/dist-packages/mraa.py", line 1680, in __init__
this = _mraa.new_Aio(pin)
ValueError: Invalid AIO pin specified - do you have an ADC?
Please help.
Comments
-
I had a quick look at the MRAA code just now, and I think this probably won't work. I had submitted a pull-request previously with a potential fix for this (https://github.com/intel-iot-devkit/mraa/pull/608), but it wasn't fully merged.
At a quick glance, I'd say he solution in that pull-request probably needs to be reworked to align with the one introduced here:
https://github.com/intel-iot-devkit/mraa/commit/bb3584fcdbbcbaf7122eb197dd8e30bba7ce2a4b#diff-ca11d156faac94eb193f7835dee4e1bb -
Thanks for the reply