I have everything setup and working. Meaning I can connect the app to the server on an raspberry pi. What I don't get is how I can control some GPIOs on the raspberry. I should add a button for example. But how the hell do I make it execute a python script for example.
Let's say I have a script called ledcontrol.py How do I execute that script by pressing a button in the raspiconnect app?
Thanks for the response. Sounds a bit complicated for me. Always eager to learn. Few more questions
Would the command be something like this? output = subprocess.call(["python", "pathtopythonscript"]) ..is this correct? It's just a script which I like to run behind the button.
Next question. In this example we configured what is behind button called B-2......what if I want to add another button called B-3 or B-4 ....would I just add another section in local.py adding the other button or do I need to create more files like local.py.
I really want to understand this since I have no programming background but am I system administrator ;-) So i can more or less read what is happening ;-)
Here is my local.py file. Hopefully it makes some sense. In the local.py file, there is a "section" for each type of raspiconnect objects. In each section, you put the code for each different action. In my example, you will see, on line 77 it starts the section for BUTTON UITYPE. There I have 3 different action buttons. I think B-2 is the one you are looking for to play a sound. If you have other types of objects, e.g. voltmeter, you have a new section and there you will put code for each object of that type. Hopefully this is making sense. Mike