Working on a simple project where I can type 192.168.x.xx/?$n
into the address bar of the browser, and then the Raspberry Pi will send a pwm signal (using WiringPi library) that is equivalent to the variable $n
to a LED. I am just starting with PHP, that's why I need help here. What I have in mind now:
<?php
exec("gpio mode 1 pwm");
//declare $n as a variable (integer maybe)
//$n = the user input value from browser (I only know $_GET, pretty sure it's not this right?)
exec("gpio pwm 1 "+$n);
?>
Will appreciate any help and pointers.