Invalid AIO pin specified - do you have an ADC?

229 views
Skip to first unread message

Rva

unread,
Sep 18, 2016, 3:08:49 PM9/18/16
to BeagleBoard
on a fresh BeagleBone Green ( debian not updated) 

this script was working 

#! /usr/bin/python
import sht31
import mraa

cov = mraa.Aio(0)
print "COV: %s" % cov.read()

with sht31.SHT31(2) as sht31:
    sht31.turn_heater_on()
    sht31.turn_heater_off()
    temperature, humidity = sht31.get_temp_and_humidity()
    print "Temperature: %s" % temperature
    print "Humidity: %s" % humidity


AFTER an apt-get install upm , that has updated librma0 and of course no change of port, sensor etc..

The same script returns an error :

Traceback (most recent call last):
  File "./test.py", line 5, in <module>
    cov = mraa.Aio(0)
  File "/usr/lib/python2.7/dist-packages/mraa.py", line 1544, in __init__
    this = _mraa.new_Aio(pin)
ValueError: Invalid AIO pin specified - do you have an ADC?

What did I wrong ? what is the solution ?

Rva

unread,
Sep 18, 2016, 3:12:41 PM9/18/16
to BeagleBoard
I add the following from apt log :

Commandline: apt-get install upm
Upgrade: upm:armhf (0.5.1-git20160410-0rcnee1~bpo80+20160410+1, 0.7.0-git20160609-0rcnee3~bpo80+20160609+1), libmraa0:armhf (0.9.5-git20160420-0rcnee1~bpo80+20160420+1, 1.0.0-git20160609-0rcnee3~bpo80+20160609+1)
End-Date: 2016-09-18  18:41:27
Reply all
Reply to author
Forward
0 new messages