I know how to interact with the GPIO pins already with python code. What i need is to somehow essentially make something clickable on the desktop that i can program to interact with the GPIO pins that will work ALONG with my python code currently running.
The system will allow it but it leads to some strange voltages on the gpio pin , helped another user that was having problems with strange voltages on gpio pins , it turned out he had 2 programs controlling the same gpio pins, so one program turned a pin off but the other turned it on , ended up with a sort of pwm output on the pin because it was being turned on and off by the 2 programs , the strange voltages were a result of the interaction of the 2 programs resulting in different duty cycles.
So write a script and put it on your desktop.
I see what your saying. Maybe having 2 things trying to interact with the same pin is going to be a problem. Is there a way I could essentially setup a button (or something I can click on) on the desktop of the pi, that will then communicate something to my python code running and trigger the program that already has control of the pin to make the changes?Andyroo wrote: ↑Thu May 23, 2019 7:52 pmHaving two programs trying to access the pin at the same time is not a great idea (even if system locks let you do it - i’m tempted to try ).
I would look to run your current code with a simple GUI using something like TkInter toolkit and have a button on there to trigger the manual change.
You can then use a global Boolean variable to say if the pin can be changed manually or not.
An intro can be found at http://effbot.org/tkinterbook/ though there are plenty of videos on YouTube. A simple button example is at http://effbot.org/tkinterbook/button.htm
Your main issue maybe keeping your current code running but without knowing how that works I cannot help.