Skip to content
This repository

A Python library for Arduino-style hardware IO support on the Beaglebone

branch: master

PyBBIO v0.8
Copyright (c) 2012, 2013 - Alexander Hiam -

PyBBIO is a Python library for Arduino-style hardware IO support on the TI Beaglebone. It currently supports basic digital IO through digitalRead() and digitalWrite() functions, ADC support through analogRead(), PWM support analogWrite() as well as a few utility functions for changing PWM frequency etc., and an Arduino-style UART interface. SPI and I2C are on the way, so keep checking the Github page for updates.

Documentation at

PyBBIO is not yet fully working with the 3.8 kernel which comes with the BeagleBone Black and newer Angstrom images. Currently only GPIO, ADC, serial are working.


It is assumed that your Beaglebone is already set up and configured on your network, and that you have already SSHed onto it.

Note that these instructions assume you want PyBBIO/ to live in your home directory. This is not a requirement and can be changed as desired.

The first step is to install the dependencies:

On Angstrom:

# opkg update && opkg install curl gcc python-pyserial python-dev
# curl | python

On Ubuntu:

# apt-get update && apt-get install curl gcc python-serial python-dev
# curl | python

Then you'll need to get the code:

# cd ~
# git clone git://

Now run the install script:

# cd PyBBIO
# python install

PyBBIO should now be installed correctly. Run the blink example to make sure all is well:

# cd examples
# python

And confirm that the LEDs next to the Ethernet jack labelled USR2 and USR3 are blinking back and forth.


I am working as fast as I can to add support for many of the features that the Beablebone's AM3359 processor has to offer, so you'll want to make sure your version is up to date. Thanks to git this is a very simple process:

# cd ~/PyBBIO
# git pull
# python install


PyBBIO is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
Something went wrong with that request. Please try again.