Category : raspberry-pi

I’m not very good at PHP and I have a problem. This is my Code: ”'<?php echo "PHP WORKS!"; exec("echo 17 > /sys/class/gpio/export"); exec("echo in > /sys/class/gpio/gpio17/direction"); $button_state = exec("cat /sys/class/gpio/gpio17/value"); echo $button_state; ?>”’ It’s embeded in a html page. The $button_state detects a gpio hardware button on a Raspberry Pi. Its this line: $button_state ..

Read more