I have a Raspberry Pi running Raspbian that I want to auto-login and then automatically run a little program that uses the GPIO, so it needs to be run as root.
I have auto login-login working as per http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.htmlthis website.
What is the best way to run a program that needs GPIO?
Is it adding the pi
user to sudoers permissions? Or would adding a line with sudo <run_program> to the bottom of the ~/.bashrc
file? I would guess the second so that the pi
user can't do any other damage?