Welcome, Guest

Author Topic: Need assistance with GPIO python library for A10-Lime  (Read 1909 times)

aspect

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Need assistance with GPIO python library for A10-Lime
« on: July 18, 2014, 12:32:23 AM »
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

  • Newbie
  • *
  • Posts: 35
  • Karma: +1/-0
Re: Need assistance with GPIO python library for A10-Lime
« Reply #1 on: July 18, 2014, 11:19:10 PM »
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)