Need assistance with GPIO python library for A10-Lime

Started by aspect, July 18, 2014, 12:32:23 AM

Previous topic - Next topic

aspect

Hi all,

I installed the python library for gpio, but am running into an error setting a pin to output. Perhaps someone can point me in the right direction?

>>> import A10Lime as lime
>>> lime.init()
>>> lime.getcfg(lime.PG0)
0
>>> lime.setcfg(lime.PG0, lime.OUTPUT)
>>> lime.getcfg(lime.PG0)
1
>>> lime.output(lime.PC3, lime.LOW)

Traceback (most recent call last):
  File "<pyshell#19>", line 1, in <module>
    lime.output(lime.PC3, lime.LOW)
IOError: GPIO is no an output


I've tried different pins and even using the A13 library instead but I always get the same error.

Any ideas?

Thanks!

kantal

Before "lime.output(lime.PC3, lime.LOW)" the following is missing:
lime.setcfg(lime.PC3,lime.OUTPUT)


Let's try to play with the LED:

lime.setcfg(lime.PH2,lime.OUTPUT)
lime.output(lime.PH2,lime.HIGH)
lime.output(lime.PH2,lime.LOW)