bitbank2 / ArmbianIO

A C (+ Python and Java) library for simplifying access to I2C, SPI and GPIO on boards supported by Armbian
GNU General Public License v3.0
80 stars 27 forks source link

Added Python bindings #4

Closed sgjava closed 6 years ago

sgjava commented 6 years ago

I kept everything in the python dir so as not to pollute the C project. It's totally independent as the swig.sh script will generate a shared library (so) and doesn't require you to make the C project first. I tested this with a clean install of Armbian on the NanoPi Duo, so it would be nice to test on other SBCs. I'll try to port the C demo to Python. I included a demo that blinks one LED on pin 12 of the Duo. The armbianio package will install locally using pip, so it's in the global path for Python program.

sgjava commented 6 years ago

Thanks man, I'll work on the demo port next.

oaquique commented 2 years ago

When building the python wrapper using wrapper.sh, I'm getting "./wrapper.sh: 39: ctypesgen.py: not found". When checked the repo, I cannot find this file under the /python directory. Where can I find it?