EuroPython 2016

Raspberry Pi GPIO Zero

Speaker(s) Ben Nuttall

I work at the Raspberry Pi Foundation and regularly give workshops on physical computing with Python to kids and teachers and we always found the existing GPIO library difficult to teach with due to its broad scope and verbose nature. Although technically possible to do all sorts of projects, it had a difficult learning curve and even the most basic of examples required explanation of code and electronics concepts.

GPIO Zero is a new friendly API for physical computing with Raspberry Pi. Like PyGame Zero, it’s a minimal boilerplate module that lets you dive straight in and build things with physical components. Simple interfaces are provided for everyday components with obvious features provided with guessable method names. The Pythonic API was designed for use in education, and was tried and tested with teachers. This talk is the story of how the library came about, how it was developed and I provide a close look at some of its cleverest features. The initial batch of work on the library was done by two people in different cities, with all features and changes discussed in length in a series of about 100 GitHub issues over 2 months, and additional features and expansions have been implemented since launch.

GPIO Zero is now the Foundation’s recommended method of interfacing with physical components, and comes pre-installed in the Raspbian Jessie image.

Documentation is provided at

Do you have some questions on this talk?

New comment