BeagleBone Black GPIO in Python

At this time, what is the easiest way to access the BeagleBone Black’s GPIO pins using Python? Python 2.7 or 3.2 on Angstrom or Ubuntu with the 3.8 kernel.


I’m using mmap in python to access the GPIO and it works fine and quite straight forward. For Ubuntu, you might need to figure out the pinmux setting to make the proper pin setting. It is regardless of python version but the kernel version may make your life easier or more difficult as 3.8 removed debugfs on pinmux, you have to change device tree blob or write overlay to change the settings.

Bai Shi

Great! I can’t wait to try it out.

I’m also a big fan of Adafruit, by the way.

Does in work in python 2.7 and 3.00?