Closed dubaxx closed 3 years ago
Same here - had to switch from root
user to pi
user to get blinker.go working. Not sure what is the reason for this.
I also encountered the same problem.
This might be some OS-related change. You can try to change this part of code: https://github.com/stianeikeland/go-rpio/blob/master/rpio.go#L630-L637
So that /dev/gpiomem
is always used (but only basic gpio functionality will work)
Also #50 this might solve your issue, can you please try?
Pulled current master down (commit b62d4be), and built the blinker
example as per OP.
Can observe voltage consistent with example's intent on output pin when run as normal user (pi
), no voltage change is observable when the same program is run as root via sudo.
Same issue here... can not get it to work on root on and RPI4, go 1.15.3 Only trying to control a single pin at the moment, program works with pi
related https://github.com/stianeikeland/go-rpio/issues/68 [fixed]
Should be fixed now - thanks to #70 by @rami-dabain.
Feel free to reopen or create a new issue in case of a problem.
I'm having a very strange issue here, hopefully someone can shed some light on the subject.
go 1.14, raspberry pi 4 B+
using the blinker.go example:
./blinker works just fine sudo ./blinker makes nothing happen.
Why is this? Normally that would be fine, except that I'm trying to use rpio along with a dht11 library that requires root access to run. I find it perplexing that running rpio with heightened privileges causes it to not work.