Jump to content
  • 0

I can't access gpio pins on Nanopi Fire 3 and Smart6818.


frkn

Question

Armbianmonitor:

Hello everone.

I'm new to embedded linux. To start with, I have nanopi fire 3 and smart 6818 cards, but I cannot access gpio pins with any gpio library. Why doesn't the NPi-GPIO library work with these cards? At first I was using the lubuntu version, I tried a lot there, but I couldn't. Now I'm trying to do something using armbian version 21.04. I'll post the problem I'm facing below. Thank you in advance for your help.

Traceback (most recent call last):
File "npigpio.py", line 1, in
import NPi.GPIO as GPIO
File "/usr/local/lib/python3.7/dist-packages/NPi.GPIO-0.5.8.6-py3.7-linux-aarch64.egg/NPi/GPIO/init.py", line 1, in
from NPi._GPIO import *
RuntimeError: Is not NanoPi based board.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Not familiar with the Npi-GPIO package. However ...

 

Standard newer way to access GPIO pins is with gpiod package:

  • gpiodetect
  • gpiofind
  • gpioget
  • gpioinfo
  • gpiomon
  • gpioset

Standard older way is to use /sys/class/gpio interface to export pins and then read/write them. This has been deprecated as it requires either root access or custom udev rules to set ownership so normal users can access them. GPIO pin numbers are also subject to change between kernel versions. But documentation on this interface is far more common online, and still works fine.

 

Also, questions regarding Smart6818 should go in Peer-to-Peer support as is not a supported board.

Link to comment
Share on other sites

  • 0

Thank you for your answer. So, does this method have any differences compared to pigpio or npi-gpio? So like the speed of accessing the pins. Because when I did an experiment on the led, I was able to get a maximum 125 Hz square signal from a normal gpio output.

Also, is there another library or method you can recommend? I would like to learn to research them too. Is it a difficult step to make it compatible by editing npi-gpio or another library?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines