I was hoping maybe one of you experienced developers might have an idea how to fix my issue. The thing is I am running a LCD display using a python script outside of Pimatic, since I wanted to display a couple of things which aren’t available through Pimatic - yet. The script runs fine and it causes not issues whatsoever if I run it over the command line. It consists of two parts: One that powers up a pin on the Raspberry Pi to enable the flow of energy through my IRL640 MOSFET and then launches the LCD script. The second one finds and kills the related processes first, then switches of the pin.
Now here comes the issue: When I use a ShellSwitch and I try to turn the display on, the GPIO pin gets powered up and the script (which is supposed to run until told otherwise is executed). So from a physical standpoint everything is fine. Also when run from the console. But If I use that in Pimatic, it also executes but then decides to say “Timeout” and go onto “off”-mode even though the scrip continues. But I obviously can’t turn it off anymore using the ShellSwitch.
Has anyone maybe gotten an idea how to fix this? Below is my code for the lcd-startup.sh.
#set mosfet pin for LCD to output
/usr/local/bin/gpio mode 0 out
#power up mosfet pin
/usr/local/bin/gpio write 0 1
#launch the python script which runs the display in background
python /home/pi/lcd/display.py &
#exit with code 0 (no errors)
Thanks in advance!