The most important part here is that you are using a Linux distribution with the 3.8 kernel. This kernel version made some fairly significant changes with how GPIO and PWM is accessed. The good news is that your BeagleBone Black came pre-installed with the proper kernel. It just may not be the latest and greatest. If you have some extra time, it may not be a bad idea to follow our installation guide for Angstrom, and flash your BeagleBone Black with the latest version.
Connecting to your BeagleBone Black (SSH)
Once you have the latest version of Angstrom on your BBB, let's ssh into the system so we can execute commands. The easiest way to gain access to the system is by using GateOne SSH. You can easily access GateOne by typing in the following into your browser window:
http://beaglebone.local
Host/IP or SSH URL [localhost]: beaglebone.local Port [22]: (just hit enter) User: root Connecting to ssh://[email protected]:22
Commands to setup and install Adafruit_BBIO
Now that you're connected to the BBB, you'll want to start with setting the date and time so that it's accurate. Copy and paste the following into your terminal (you may want to make it execute this on startup in the future):/usr/bin/ntpdate -b -s -u pool.ntp.org
opkg update && opkg install python-pip python-setuptools python-smbus pip install Adafruit_BBIO
Test your Installation (optional)
You can optionally test if your installation was successful by simply trying to load one of the modules. Execute the following command from the console (not from within the python interpretor), it shouldn't throw any errors, but return one line:python -c "import Adafruit_BBIO.GPIO as GPIO; print GPIO" #you should see this or similar: <module 'Adafruit_BBIO.GPIO' from '/usr/local/lib/python2.7/dist-packages/Adafruit_BBIO/GPIO.so'>
import Adafruit_BBIO.GPIO as GPIO; print GPIO #you should see this or similar: <module 'Adafruit_BBIO.GPIO' from '/usr/local/lib/python2.7/dist-packages/Adafruit_BBIO/GPIO.so'>
Manual Installation (optional)
You can also install Adafruit_BBIO by cloning the git repository. The following commands should get it installed as well:git clone https://github.com/adafruit/adafruit-beaglebone-io-python.git #set the date and time /usr/bin/ntpdate -b -s -u pool.ntp.org #install dependency opkg update && opkg install python-distutils python-smbus cd adafruit-beaglebone-io-python python setup.py install