Page 1 of 1

Python on NanoPi

Posted: Sun Sep 17, 2017 12:04 am
by mikemoy
I would like to learn Python, and use it on the NanoPi. Most of the examples I am seing are for the RPI.
How can I use things like I2c & SPI for it.

Re: Python on NanoPi

Posted: Sun Sep 17, 2017 12:57 am
by davef
As far as I aware Python and C, and likely most programming languages will be able to call your peripheral devices, ie SPI, I2C, etc. What is more important is do they do it properly!

If you are working on the original NanoPi, seeing it was my main development platform I would suggest first searching around for nanopi and I2C on this forum. I could not get it to work properly, maybe because I am not a kernel hacker. There were timing issues that were never resolved.

Consequently, I had to move to a RaspberryPi where SPI and I2C just seem to work properly.

I would suggest moving to a more recent FA product. However, learning on any platform I am sure will be beneficial.

Good luck!

Re: Python on NanoPi

Posted: Fri Sep 22, 2017 12:53 am
by mikemoy
Thanks. However Friendly Elec needs to create a GPIO library for python first.

Re: Python on NanoPi

Posted: Fri Sep 22, 2017 3:38 am
by davef
Consider porting pigpio to the NanoPi. Are you running Debian Jessie on the NanoPi?

Re: Python on NanoPi

Posted: Tue Sep 26, 2017 7:28 pm
by SunWukong
mikemoy wrote:
I would like to learn Python, and use it on the NanoPi. Most of the examples I am seing are for the RPI.
How can I use things like I2c & SPI for it.

It is not always easy as on an Raspberry, but it works.
This may help you a bit: Using I2C on NanoPi Duo with Python

Re: Python on NanoPi

Posted: Wed Sep 27, 2017 7:16 am
by davef
I think one needs to be clear which model of NanoPi one is working on and which version of the operating system one is using.

Re: Python on NanoPi

Posted: Thu Sep 28, 2017 12:20 am
by mikemoy
davef wrote:
I think one needs to be clear which model of NanoPi one is working on and which version of the operating system one is using.


I don't think that is necessary because we are in the NanoPi Duo section of the forum, and there is only one operating system for it.

Re: Python on NanoPi

Posted: Thu Sep 28, 2017 6:41 am
by davef
Right! I saw the title "Python on NanoPi" and did not see which forum it was associated with.