I'm trying to run Arduino IDE (CLI) from php script using shell_exec()
with my Raspberry Pi that works as server. The command that build and upload sketch is inside a bash script. When I run it with terminal locally, it works fine, but if I run it using Postman from client side, Arduino IDE gives me this error:
Picked up JAVA_TOOL_OPTIONS:
Settings issues: Arduino cannot run because it could not
create a folder to store your settings.
Bash script:
#...arduino command
/opt/arduino-1.8.3/arduino --board arduino:samd:mkr1000 --port /dev/ttyACM0 --upload /path/of/sketch/sketch.ino
Php script:
...
$command = './compileAndUpload.sh';
shell_exec($command);
...
I tried to modify settings.path
from preferences.txt
in Arduino folder thinking the problem was related permissions but it did not work.
Could someone help me? Thanks