Permissions

Any program that accesses the GPIO pins must be run as root, so if you get an error, remember to “sudo” your command or run your application as root.

To avoid this the GPIO pins can be exported and have their ownership changed appropriately [Resource on this wanted].

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. Juozas Kimtys

    3 years ago

    How to use IO pins correctly – it is an interesting question. There are my first attempts to make something on my new “Pi 4 4GB “. Raspbian (2019-07-10), me working as user “pi”. Firstly, I have connected four LED’s to pins GPIO17, GPIO27, GPIO22 and GPIO18. On Node-RED I have created and deployed application, that sequentially switches ON/OFF these LED’s. After, I have stopped Node-RED service and have started to look what to do with Thonny Python IDE. Created and loaded to execute another application (by using gpiozero library), that similarly sequentially switches ON/OFF these LED’s. If, during this execution, to manually start Node-RED service, my LED’s will start to blink by using both applications – sure out off order. If to close Thonny Python IDE, only one LED’s blink sequence will be active – those that initiated by Node-RED. No any visible error messages – very friendly system. Friendly, but, sure, not in all cases acceptable.

Leave a Reply to Juozas Kimtys Cancel reply

Your email address will not be published. Required fields are marked *