oa20gpiolib and oa20max31855 library

Started by Mouchon, November 21, 2013, 09:17:07 PM

Previous topic - Next topic

Mouchon

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.

gnomathibus

#1
hi, I did not need lcd but I need a lot of gpio is that I can use gpio lcd connector with this library?

Mouchon

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.

gnomathibus

thank you for your answer, I waits to receive my card to test this

has soon

sanzoghenzo

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!