P am trying to implement a button that will run a Python script forward.py
(move my robot forward) using Lighttpd web server/PHP 7.0.
The Python script works perfectly when executed in the terminal window however when I try to run it from the click of the button it does not work.
Here is my basic HTML code to execute the .py
script:
<html><body>
<h1> Development of Internet controlled robot </h1>
<input type="button" name="forwardbutton" value=" Move forward "onClick="<? exec(' python /var/www/html/forward.py'); ?>">
</body></html>
I have changed the owner of the forward.py
script to be www-data
however this has made no difference.
I am quite new to working with Raspberry Pis.