I have interfaced a push button switch and LEDs to GPIO.
Whenever I try to execute the script from command line, the code
python /home/myPi/myProject/run.py gives me the error
RuntimeError: Unable to export GPIO. Try to run as root!
But if the same script works perfectly with
sudo python /home/myPi/myProject/run.py
How to resolve this error? I want to run the script at startup.
Please guide me. Thanks