Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: Mouchon on November 21, 2013, 09:17:07 PM

Title: oa20gpiolib and oa20max31855 library
Post by: Mouchon on November 21, 2013, 09:17:07 PM
Hi All,

I made a c library ( oa20gpiolib )based  on c code find in pyA20 package (https://pypi.python.org/pypi/pyA20)

The change made are:

- make a c library from gpio_lib.c and gpio_lib.h using CMake
- make wrapper function to map gpio# to olimex a20 connector so you can use oa20_xxxx(connector_num,pin_num)
  ie: oa20_gpio_output(3,7,HIGH) will put green led of the board on, (pin 7 of connector gpio3).
- add some arduino like wrapper function (digitalWrite,digitalRead,...)

Based on it i also make another library (oa20max31855) based on arduino code for the Adafruit_MAX31855 shield.

(http://www.adafruit.com/products/269

oa20gpiolib can be found : https://github.com/lephiloux/oa20gpiolib
oa20max31855 can be found: https://github.com/lephiloux/oa20max31855


hope this can be usefull for other

Philippe.
Title: Re: oa20gpiolib and oa20max31855 library
Post by: gnomathibus on November 27, 2013, 01:23:25 PM
hi, I did not need lcd but I need a lot of gpio is that I can use gpio lcd connector with this library?
Title: Re: oa20gpiolib and oa20max31855 library
Post by: Mouchon on November 27, 2013, 11:44:00 PM
Hi,

No but this is something that i can do.
You can may be try to change  your  script.bin (fex file) to remove lcd entry and add corresponding pin in
entry [gpio_para] and/or [gpio_init]

You can then use gpio_sunxi modules and /sys/class/gpio/

Philippe.
Title: Re: oa20gpiolib and oa20max31855 library
Post by: gnomathibus on November 28, 2013, 08:16:34 PM
thank you for your answer, I waits to receive my card to test this

has soon
Title: Re: oa20gpiolib and oa20max31855 library
Post by: sanzoghenzo on February 06, 2014, 01:25:23 PM
Thanks Mouchon!
This post should be always on top of the forum, olimex please make it sticky!
Or at least add the link on A20 wiki!