Control GPIOs on OLinuXino-A20.
Project description
This package provides class to control the GPIO on Olinuxino A20.
Current release does no support any peripheral functions.
Example
=======
Typical usage::
#!/usr/bin/env python
import A20_GPIO as GPIO
The 'x' in the example below represents the number of the extension connector, and 'y' is the pin number on the connector.
#init module
GPIO.init()
#configure module
GPIO.setcfg(PINx_y, GPIO.OUTPUT)
GPIO.setcfg(PINx_y, GPIO.INPUT)
#read the current GPIO configuration
config = GPIO.getcfg(PINx_y)
#set GPIO high
GPIO.output(PINx_y, GPIO.HIGH)
#set GPIO low
GPIO.output(PINx_y, GPIO.LOW)
#read input
state = GPIO.input(PINx_y)
#cleanup
GPIO.cleanup()
Warning
=======
Before using this tool it is HIGHLY RECOMENDED to check Olinuxino
A20 schematic.
Changelog
===================================
* pyA20 0.1.0 (2013-08-21)
* Initial release
* pyA20 0.1.3 (2013-08-23)
* Fixed wrong distribution uploaded
* pyA20 0.1.5 (2013-09-13)
* changed pin GPIOs reference to PINx_y
Current release does no support any peripheral functions.
Example
=======
Typical usage::
#!/usr/bin/env python
import A20_GPIO as GPIO
The 'x' in the example below represents the number of the extension connector, and 'y' is the pin number on the connector.
#init module
GPIO.init()
#configure module
GPIO.setcfg(PINx_y, GPIO.OUTPUT)
GPIO.setcfg(PINx_y, GPIO.INPUT)
#read the current GPIO configuration
config = GPIO.getcfg(PINx_y)
#set GPIO high
GPIO.output(PINx_y, GPIO.HIGH)
#set GPIO low
GPIO.output(PINx_y, GPIO.LOW)
#read input
state = GPIO.input(PINx_y)
#cleanup
GPIO.cleanup()
Warning
=======
Before using this tool it is HIGHLY RECOMENDED to check Olinuxino
A20 schematic.
Changelog
===================================
* pyA20 0.1.0 (2013-08-21)
* Initial release
* pyA20 0.1.3 (2013-08-23)
* Fixed wrong distribution uploaded
* pyA20 0.1.5 (2013-09-13)
* changed pin GPIOs reference to PINx_y
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyA20-0.1.5.tar.gz
(6.7 kB
view hashes)