GithubHelp home page GithubHelp logo

Comments (5)

elpimous avatar elpimous commented on August 16, 2024

here are specs :

nvidia@tegra-ubuntu:~$ ls -lL /sys/class/gpio/gpio298
total 0
-rw-r--r-- 1 root root 4096 Jan 21 19:39 active_low
drwxr-xr-x 4 root root    0 Jan 21 15:01 device
-rw-r--r-- 1 root root 4096 Jan 21 19:28 direction
-rw-r--r-- 1 root root 4096 Jan 21 19:39 edge
drwxr-xr-x 2 root root    0 Jan 21 19:39 power
drwxrwx--- 2 root gpio    0 Jan 21 19:28 subsystem
-rw-r--r-- 1 root root 4096 Jan 21 19:28 uevent
-rw-r--r-- 1 root root 4096 Jan 21 19:39 value

from opi.gpio.

sgjava avatar sgjava commented on August 16, 2024

This is for the NanoPi Duo, but maybe it will work with sysfs in general http://www.friendlyarm.com/Forum/viewtopic.php?f=59&t=949. Oh, and don't forget to send us a pic of the eyes!

from opi.gpio.

rm-hull avatar rm-hull commented on August 16, 2024

This issue was discussed in #14 - see also https://forum.armbian.com/topic/5225-gpio-from-python-user-space-opigpio-app/

from opi.gpio.

elpimous avatar elpimous commented on August 16, 2024

Hi Richard.
Well, it doesn't work for me. Bad !

the command serial = spi(port=3, device=0, bus_speed_hz=8000000, transfer_size=4096, gpio=GPIO, gpio_DC=1, gpio_RST=2)
returns this error :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 255, in __init__
    bitbang.__init__(self, gpio, transfer_size, DC=gpio_DC, RST=gpio_RST)
  File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 153, in __init__
    self._DC = self._configure(kwargs.get("DC"))
  File "/usr/local/lib/python2.7/dist-packages/luma/core/interface/serial.py", line 164, in _configure
    self._gpio.setup(pin, self._gpio.OUT)
  File "/usr/local/lib/python2.7/dist-packages/OPi/GPIO.py", line 370, in setup
    raise e
IOError: [Errno 13] Permission denied: '/sys/class/gpio/export'

Here is my newbie question : can I call this command as root, inside my non-root python ? Perhaps my question is silly, sorry !

from opi.gpio.

rm-hull avatar rm-hull commented on August 16, 2024

I think this can be closed with the merge of #28

from opi.gpio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.