Wednesday, December 5, 2012

A python module for workshops

The PYPTUG python PyHack workshops are about bridging the virtual and the physical, using Python. Since we use the Raspberry Pi, and it is still hard to get a hold of them in a timely manner, several potential attendees were asking if they could still benefit from coming to the workshop this saturday, without a Raspberry Pi.


But the answer doesn't stop there. We've made available a RPi.GPIO replacement for testing Raspberry Pi GPIO code on non Raspberry Pi platforms. Meaning, your laptop.

Your laptop will have a split personality


It is a Python module that implements a setmode(), setup(), cleanup(), input(), output(), tracks 54 GPIO states and directions, broadcom and board modes, placeholders for the 4 set_*_event() functions, has some error handling. There is even a debug mode (gpio.debug = True).

Enough to not get an error trying the code for the workshop.


Head over to the Raspberry Pi Python Adventures blog for the full instructions (right here) on getting this from bitbucket.


Leave a comment, we'll gladly help.

No comments:

Post a Comment