Package: pingo
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 aBoardsubclass. Every board has a dictionary calledpinswhich lists all GPIO pins on the board. Each pin is an instance of aPinsubclass with attributes that you can inspect to learn about its capabilities.The namePingois a tribute toGaroa Hacker Clube, where the project started (the wordspingoandgaroaare related in Portuguese). To our English-speaking friends we like to say that it means“pin, go!”– the main purpose of this package.Basic usageTo usepingo, the first step is to instatiate a concreteBoard. Each Pingo driver is a concrete board, for example,pingo.rpi.RaspberryPiandpingo.arduino.ArduinoFirmataare 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 apingo.arduino.ArduinoFirmatainstance.Once you have a board instance, its possible to access its pins through theboard.pinsdict.importpingofromtimeimportsleepboard=pingo.detect.MyBoard()led_pin=board.pins[13]led_pin.mode=pingo.OUTwhileTrue:led_pin.hi()sleep(1)led_pin.lo()sleep(1)Driverspingo.udoo.udoopingo.arduino.yunare examples of drivers, and the respectiveUdooandYunBridgeare extends thepingo.board.Boardinterface class.The following table lists the drivers currently planned or under development.BoardTypeModule/PackageStatusNotesArduino Firmataremotearduinolevel 1requiresfirmata protocolon any Arduino boardArduino Yúnon-boardexperim.requiresBridge sketchon the Arduino YúnTI BeagleBone Blackon-boardbbbexperim.Cubietech Cubieboardon-boardnoneFantasmafakeghostlevel 1not a real board, just a software fake for testingSolidRun HummingBoardon-boardnoneIntel Galileoon-boardgalileononeTI MSP430remotenonerequiresfirmata protocolon any MSP430 boardLinkSprite pcDuinoon-boardpcduinolevel 1element14 RaspberryPion-boardrpilevel 0requiresRPi.GPIOon the Raspberry PiSECO UDOOon-boardudoolevel 0Types of driverson-boardPingo and user code run on the board itself, using the Python interpreter installed in it.remotePingo 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.fakePingo and user code run on host computer emulating a dummy board in software. Useful for testing base classes fromboard.pyand for teaching and demonstration.Status of driverslevel 0Digital I/O: get/set high/low status of digital pins (no PWM support).level 1Analog input: read values from analog pins.level 2PWM output: set variable value for digital pins with PWM capability.experimentsSome Python experiments have been done with the board. See theexperiments/directory for code that may be helpful to start a new driver for a board.noneNothing has been done. Great opportunity for you to contribute with experiments and/or start a new driver.