python GPIO not working on Rev C?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- tdicola
- Posts: 1074
- Joined: Thu Oct 17, 2013 9:11 pm
Re: python GPIO not working on Rev C?
Ah, good to hear you got things working. Was starting to get worried there was something more serious going on. :)
- rogermorrell
- Posts: 2
- Joined: Thu Jun 26, 2014 12:07 pm
Re: python GPIO not working on Rev C?
I have been following this with interest but don't understand the solution? I tried to run the simple Python GPIO script that is in the Matt Richardson - getting Started with BB book. It loops flashing the LED on P8_12 and does not work. Are you saying there is still a issue in using GPIO from a script?
- rogermorrell
- Posts: 2
- Joined: Thu Jun 26, 2014 12:07 pm
Re: python GPIO not working on Rev C?
Ok, like Dammer , I also remember Unix and then solved the problem myself. The solution was there in the previous dialog, I just did not see it.
It is that to use the GPIO you need to run as root. What we had done was running in the windowed interface and bring up a shell window. This runs as user "debian" . by doing sudo python script.py it worked!
too obvious. We had done it this way because I was doing a project with my grandkids and was being a little cautious.
It is that to use the GPIO you need to run as root. What we had done was running in the windowed interface and bring up a shell window. This runs as user "debian" . by doing sudo python script.py it worked!
too obvious. We had done it this way because I was doing a project with my grandkids and was being a little cautious.
- tdicola
- Posts: 1074
- Joined: Thu Oct 17, 2013 9:11 pm
Re: python GPIO not working on Rev C?
No problem, yep running as root unfortunately is required to access GPIO. Good luck with the project!
Please be positive and constructive with your questions and comments.