Wonder if anyone can help me, because I ran out of options. :confused: Since I upgraded to PCP8 my Pyhton script that is running at startup stopped working.
I have a python script that checks "pcp mode" and then turns on a slow flashing led in a button. When you press the button it plays or pauses ("pcp play" or "pcp stop"). The script is started from a shell script, that I added to "user commands" under "tweaks".
When I upgraded to PCP8 it stopped working. It doesn't flash when playing and doesn't pause/play. Checking 'top", I can see that the script is running (and it responds to button press and lights the led, so it can read and write GPIOs), but it seems to not be able to read the "pcp mode" status, or write "pcp play" or "pcp stop" anymore.
The related part of the script is:
When I start it manually from the terminal like this:
it runs perfectly fine.
Anybody have any suggestions? There doesn't seem to be any logfiles I can check either..
I have a python script that checks "pcp mode" and then turns on a slow flashing led in a button. When you press the button it plays or pauses ("pcp play" or "pcp stop"). The script is started from a shell script, that I added to "user commands" under "tweaks".
When I upgraded to PCP8 it stopped working. It doesn't flash when playing and doesn't pause/play. Checking 'top", I can see that the script is running (and it responds to button press and lights the led, so it can read and write GPIOs), but it seems to not be able to read the "pcp mode" status, or write "pcp play" or "pcp stop" anymore.
The related part of the script is:
Code:
state = subprocess.getoutput("pcp mode")
if state == "play":
os.system('pcp stop')
else:
os.system('pcp play')
Code:
sudo nohup python3 button.py &
Anybody have any suggestions? There doesn't seem to be any logfiles I can check either..