The Internet of Things is here: single-board computers like the Raspberry Pi, Arduino TRE, Intel Edison, BeagleBone Black, pcDuino etc. are better netizens than the original Arduino, and we can program them in high-level languages like Python. But each has a different API, so projects are hard to port from one board to the next. And some of these APIs are thin layers on top of low-level C APIs that do not leverage the best features of Python.
Pingo is a multiplatform API for controlling the GPIO pins used for physical computing. Pingo runs embedded in boards that run GNU/Linux, but can also remotely control multiple Arduinos via the Firmata protocol — always with the same API. Pingo brings uniformity and high-level services to embedded systems programming. By leveraging Python and its rich ecosystem of networking libraries, IoT projects can be developed much faster, and porting among boards becomes trivial.
Using the Python console or the powerful graphic IPython Notebook, Pingo allows interactive exploration of the built-in functionality of different boards using an intuitive, object-oriented API. This means that each pin is not merely a number, but a rich object that can be inspected live for its capabilities, interactively answering questions like:
The pins can also be individually or collectively controlled with simple interactive commands.
In addition, Pingo provides higher-level objects representing displays, sensors, and actuators, and those objects work the same way across all supported boards, thanks to the hardware abstraction at the core of the generic board and pin base classes.
This talk will show how Pingo works, with a live demo involving at least two different boards cooperating (a video demo will be prepared as plan B). We’ll then discuss the usability concerns that drove the design of the API: how it was inspired by the original Arduino but leveraged the high-level, user-friendly features of Python to enable simple, interactive exploration and control of GPIO pins. That’s why Pingo means simply “pin, go!”
Luciano Ramalho is the author of Fluent Python. Ramalho was a Web developer before the Netscape IPO in 1995, and switched from Perl to Java to Python in 1998. Since then he worked on some of the largest news portals in Brazil using Python, and taught Python web development in the Brazilian media, banking and government sectors. He has spoken multiple times at OSCON, PyCon, PythonBrasil, FISL and RuPy. Ramalho is a member of the Python Software Foundation and co-founder of Garoa Hacker Clube, the first hackerspace in Brazil. He is a managing partner at Python.pro.br, a training company.
©2015, O'Reilly Media, Inc. • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • firstname.lastname@example.org