pyA20 GPIO module is uploaded yesterday to Pypi https://pypi.python.org/pypi/pyA20/0.1.0
The use is same as the Python modules for imx233, A10S, A13 OLinuXino:
#!/usr/bin/env python import A20_GPIO as GPIO #init module GPIO.init() #configure module GPIO.setcfg(GPIO.PIN#, GPIO.OUTPUT) GPIO.setcfg(GPIO.PIN#, GPIO.INPUT) #read the current GPIO configuration config = GPIO.getcfg(GPIO.PIN#) #set GPIO high GPIO.output(GPIO.PIN#, GPIO.HIGH) #set GPIO low GPIO.output(GPIO.PIN#, GPIO.LOW) #read input state = GPIO.input(GPIO.PIN#) #cleanup GPIO.cleanup()
this is initial release so if you find some bugs please report back to us 🙂
mauricio
Sep 11, 2013 @ 04:18:55
hello, using 0.1.3 release
I tried to run a blink script, but receive this error message
Traceback (most recent call last):
File “./test.py”, line 35, in
main()
File “./test.py”, line 13, in main
GPIO.setcfg(GPIO.PIN37, GPIO.OUT)
AttributeError: ‘module’ object has no attribute ‘PIN37’
any advice ?
thanks in advance
Lub/OLIMEX
Sep 11, 2013 @ 09:19:53
Hello Mauricio,
The read me is a bit outdated. If you look at the code you will see that LED2 is named “GPIO.PIN_PH2”, for instance.
Replace GPIO.PIN37 with GPIO.PIN_PH2.
Regards,
Lub/OLIMEX
mauricio
Sep 12, 2013 @ 03:43:31
hello, thank you
also, it was necesary to change OUT to OUTPUT (from pyA20.c)
and … some info could be sent to this people so it can be included in the map
https://www.olimex.com/forum/index.php?topic=1514.0
thanks again