Skip to main content

Generic API to control boards with programmable IO pins.

Project description

Pingo provides a uniform API to program devices like the Raspberry Pi, BeagleBone Black, pcDuino etc. just like the Python DBAPI provides an uniform API for database programming in Python.

The API is object-oriented but easy to use: a board is an instance of a Board subclass. Every board has a dictionary called pins which lists all GPIO pins on the board. Each pin is an instance of a Pin subclass with attributes that you can inspect to learn about its capabilities.

The name Pingo is a tribute to Garoa Hacker Clube, where the project started (the words pingo and garoa are related in Portuguese). To our English-speaking friends we like to say that it means “pin, go!” – the main purpose of this package.

Basic usage

To use pingo, the first step is to instatiate a concrete Board. Each Pingo driver is a concrete board, for example, pingo.rpi.RaspberryPi and pingo.arduino.ArduinoFirmata are two such boards.

Pingo can automatically detect the board in most common cases. If it is running on a supported board, pingo.detect.MyBoard() returns an proper board instance. If Pingo is running on an unsupported machine (eg. a PC running GNU/Linux), it will try to find a remote Arduino using the Firmata protocol via USB and – if succesfull – will return a pingo.arduino.ArduinoFirmata instance.

Once you have a board instance, its possible to access its pins through the board.pins dict.

import pingo
from time import sleep

board = pingo.detect.MyBoard()
led_pin = board.pins[13]
led_pin.mode pingo.OUT

while True:


pingo.udoo.udoo are examples of drivers, and the respective Udoo and YunBridge are extends the pingo.board.Board interface class.

The following table lists the drivers currently planned or under development.

Board Type Module/Package Status Notes
Arduino Firmata remote arduino level 1 requires firmata library on any Arduino board
Arduino Yún on-board experim. requires Bridge sketch on the Arduino Yún
BeagleBone Black on-board bbb experim.  
Fantasma fake ghost level 1 not a real board, just a software fake for testing
Intel Galileo on-board galileo none  
pcDuino on-board pcduino level 1  
Raspberry Pi on-board rpi level 0 requires RPi.GPIO on the Raspberry Pi
UDOO on-board udoo level 0  

Types of drivers

Pingo and user code run on the board itself, using the Python interpreter installed in it.
Pingo and user code run on host computer connected to board, controlling the board remotely. Useful for boards that are unable to run Python, like the Arduino UNO.
Pingo and user code run on host computer emulating a dummy board in software. Useful for testing base classes from and for teaching and demonstration.

Status of drivers

level 0
Digital I/O: get/set high/low status of digital pins (no PWM support).
level 1
Analog input: read values from analog pins.
level 2
PWM output: set variable value for digital pins with PWM capability.
Some Python experiments have been done with the board. See the experiments/ directory for code that may be helpful to start a new driver for a board.
Nothing has been done. Great opportunity for you to contribute with experiments and/or start a new driver.

Release history Release notifications

History Node


This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pingo-0.1.9.tar.gz (14.6 kB) Copy SHA256 hash SHA256 Source None Jun 13, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page