PyBBIO library was developed with Arduino users in mind. It emulates the structure of an Arduino (http://arduino.cc) program, as well as the Arduino API where appropriate. If you've never seen an Arduino program, it consists of a
setup() function, which is called once when the program starts, and a
loop() function, which is called repeatedly until the end of time (or until you turn off the Arduino).
PyBBIO accomplishes a similar structure by defining a
run() function that is passed two callable objects, one that is called once when the program starts, and another that is called repeatedly until the program stops. So the basic
PyBBIO template looks like this:
from bbio import * def setup(): pinMode(GPIO1_16, OUTPUT) def loop(): ...