Page 1 of 1

Running Python code on NanoPI M3

Posted: Fri Jul 15, 2016 6:01 pm
by corebug
Hello there!

I've got a brand new NanoPI M3 board with Debian OS. I thought its GPIO is supposed to be Raspberry Pi compatible, but when i try to use the RPi.GPIO Python module i get such an error:

Code: Select all

[20:22][NanoPi3][~] # python -c "import RPi.GPIO;"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/RPi/GPIO/", line 23, in <module>
    from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!

Is there any chance that i could somehow use RPi.GPIO on my NanoPI, or is there any other Python library to work with M3's GPIO?

Re: Running Python code on NanoPI M3

Posted: Wed Jul 20, 2016 1:08 am
by FATechsupport
The GPIO is not 100% pin to pin identical to RP's. You need to check M3's GPIO pin description and make some changes accordingly. ... _M3#Layout