I am very new to most of this so please forgive my ignorance. Basically I am wanting to control a servo motor with a python program using the Gcode System Command. So what I did was proof out my python code so that it properly executes. It is located in /share/Swipper.py. I then created a .sh program that simply calls this python program and it's located in the same folder. I then assigned OCTO10 to /share/Swipper.sh & . This run on the terminal of Octoprint doesn't seem to modify the Servo position but when I am on CLI I try to run ./share/Swipper.sh and it says no attribute found. So then I "cd" into the /share folder and run ./Swipper.sh and it performs exactly as I would expect. So I am wondering how do I need to write these programs in order to get OCTO10 to work properly. It seems like nothing I am trying is having an effect. Below is my code:
<Swipper.sh>
#!/bin/bash
sudo python3 /share/Swipper.py &
any help would be much appreciated.