Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User space access to GPIO to run rootless #133

Closed
ymollard opened this issue Nov 22, 2016 · 3 comments
Closed

User space access to GPIO to run rootless #133

ymollard opened this issue Nov 22, 2016 · 3 comments

Comments

@ymollard
Copy link

The raspberry Pi team released a user-space API to access the GPIO: raspberrypi/linux#1112

Using /dev/gpiomem would allow to run the program rootless.
Can this feature be easily implemented?

@sschroe
Copy link
Contributor

sschroe commented Nov 22, 2016

From what i can tell this does not provide access to the PWM memory areas. Since we need those it is not really usable for this lib.

@penfold42
Copy link
Contributor

If non root is a requirement there are a couple of options:

  1. write a daemon running as root that listens on a named pipe and uses this code for the led interface. Piblaster does this and then you're non root consumer writes to the pipe.
  2. use the SPI interface rather than this library. I added this option to Hyperion.

@ymollard
Copy link
Author

ymollard commented Jan 3, 2017

@penfold42 I followed your advice to use SPI w/o root, but needed a Python API so I inspired myself from an existing WS2812B + SPI lib. However I experience flashes (the full strip briefly flashing with random colors, approx. every minute but not regular). I noticed than changing the speed in Hz was influencing the quantity of flashes, however I could never fully get rid of them. Maybe changing the delay between blocks could also help. Not sure yet if the problem is the problem is SPI related or WS2812B-protocol related but if you have any clue, feel free :) I also poked the author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants