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
Categories
- All Categories
- 105 Announcements & News
- 55 Product News - New Product/Product Change Notice/ End-of-life
- 186 Welcome Developers!
- 55 Unboxing & Project Sharing
- 50 Tech Updates
- 693 UP Products
- 11 UP 7000
- 1 UP Squared i12
- 10 UP Xtreme i12
- 11 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 19 UP Squared V2
- 59 UP 4000
- 24 UP Xtreme i11
- 35 UP Squared 6000
- 60 UP Squared Pro
- 143 UP Xtreme
- 837 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 222 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 216 Starter Kits & Peripheral