Beaglebone-Black: Cannot install the Adafruit-BBIO in Arch

`

pip install Adafruit_BBIO
Downloading/unpacking Adafruit-BBIO
Downloading Adafruit_BBIO-0.0.18.tar.gz
Running setup.py egg_info for package Adafruit-BBIO
Traceback (most recent call last):
File “”, line 16, in
File “/tmp/pip_build_root/Adafruit-BBIO/setup.py”, line 7
print “py_compile module missing; installing to %spy_compile.py” %
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File “”, line 16, in

File “/tmp/pip_build_root/Adafruit-BBIO/setup.py”, line 7

print “py_compile module missing; installing to %spy_compile.py” %\

^

SyntaxError: invalid syntax

Well first off if you read the github change that make it clear it is possible for breakage to happen if you use it as development continues. " Second did you install python-pip and python-setuptools or did you install python2-pip and python2-setuptools I just got done compiling around 30 something python and python2 packages on Arch and have not had a single issues relating to a broken python or python2 install. My guess is you need the python2 related packages. If it is a broken python install I would try reinstalling python and python2 test again. If still borked try creating a new image test again, if borked again report a bunch to archlinuxarm . My guess is there is nothing wrong with the python* packages.

I forgot to mention that you really should be creating a PKGBUILD for installing this as well.

I managed to compile BBIO and before that I installed python2 packages.
Now there’s a new problem, let’s see following code
`

import Adafruit_BBIO.ADC as ADC

ADC.setup()
value = ADC.read(“P8_36”)
voltage = value * 1.8 #1.8V
print voltage
`

It should print the analog pin 5 value, but this error appears:
`

python2 voltage.py

Traceback (most recent call last):
File “voltage.py”, line 3, in
ADC.setup()
RuntimeError: Unable to setup ADC system. Possible causes are:

  • A cape with a conflicting pin mapping is loaded
  • A device tree object is loaded that uses the same name for a fragment: helper

`

which arch kernel are you running? You should be on the legacy one for the beagle if you’re working with capes also you should make sure you’re using dtc-overlay as opposed to dtc. This post has some information in regards to the device tree and arch linux arm.

Thank you! I used the latest 3.12 kernel and installed the legacy version. Now my program works fine!
By the way, why doesn’t the newest kernel support the capes?

lauantai, 23. marraskuuta 2013 20.28.13 UTC+2 don kirjoitti:

3.12 does not have full cape support as of yet. 3.8 gives you all the cape stuff, 3.12 is better with USB and a few other things right now.

3.12 is just barely ( a month or so ) out of RC status. Just need someone to port the code and device tree files over from 3.8. Which probably is harder than I made it sound. Not really sure I have not looked at the code on either kernel version.

this worked for me

  1. git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git
  2. #set the date and time
  3. /usr/bin/ntpdate -b -s -u pool.ntp.org
  4. #install dependency
  5. opkg update && opkg install python-distutils python-smbus
  6. cd adafruit-beaglebone-io-python
  7. python setup.py install