We’re currently testing our Python library for controlling GPIO on the Raspberry Pi. Once it’s ready for prime time we’ll be releasing it on github, like the gpio-admin library on which it relies, under an Open Source License.
We’ve put up a basic demo on YouTube; the first one isn’t that exciting, as one flashing LED looks much like another. We hope to have some prettier videos soon.
Here’s the code that drives the LED:
from quick2wire.gpio import Pin from time import sleep out_pin = Pin(12, Pin.Out) for i in range(0, 10): out_pin.value = 1 sleep(1) out_pin.value = 0 sleep(1) out_pin.unexport()
The ’12′ used to identify the pin refers to the pin number on the expansion header. You can find a neat diagram of the header here.