I’m not looking for something like “hey you can run sudo idle in a terminal window”, I’m looking for something like what under /dev/ or /sys/ can I make writable by the gpio group that the pi user is a member of by default, so that a python script that uses the HAT can work without using sudo. I’ve found various information online about making PWM stuff usable without sudo but none of it has made the HAT usable without sudo.
The HAT is attached to a Pi3 running Raspberry Pi OS 10.
This isn’t a case of something I’m trying to do doesn’t work because I get an error and I don’t know why. I know how to use the Unicorn HAT as described in the documentation for it. I am not a Linux noob. ;)
The product description for the Unicorn HAT Mini that you have (Unicorn HAT Mini) says
the driver chip are different to all of our other Unicorn boards (Unicorn HAT, Unicorn pHAT, Unicorn HAT HD, Ubercorn)
and I don’t see anything in the production description or the README of the library for using it about having to run scrips which address it under sudo or that it uses PWM like the Unicorn HAT does. So maybe, I don’t know because I can’t just find anything that says so either way, scripts which address that do not have to be run under sudo.
Ok, I just went and had a look see at the documentation for the Unicorn hat, and it does say it needs root access. I should have done that before replying, sorry about that.
I also have the Unicorn Hat HD and it runs fine without having to use sudo. That made me wonder why the Hat needs it? I just didn’t do my homework before replying. ops =(.
It looks like the Unicorn Hat, and Unicorn pHat address the LED’s differently than any of the others. Just the one data line.
My Unicorn Hat Mini and Unicorn Hat HD both use SPI. Using SPI they can be accessed like any other SPI display with no need for any special privileges.
Unicorn HAT Mini uses non-smart RGB LEDs, the same as our Unicorn HAT HD, rather than NeoPixel or DotStar-type addressable LEDs, driven by two LED matrix driver chips (the Holtek HT16D35A).
So anyone know how to use Unicorn HAT without sudo? Seems like it ought to be possible and just a matter of knowing the right things to change permissions on but I still can’t figure it out.
I would love to hear if anyone found out anything - currently wrestling with the same thing. So far only found https://github.com/jgarff/rpi_ws281x/issues/155 saying that it’s impossible, so yeah… -_-