diff --git a/lib/GpioPin.php b/lib/GpioPin.php index 3ed9b07..10e43da 100644 --- a/lib/GpioPin.php +++ b/lib/GpioPin.php @@ -46,6 +46,7 @@ class GpioPin { $this->pin = (int)$pin; $this->export(); + $this->fd = fopen("/sys/class/gpio/gpio{$pin}/value", "rb"); } public function __destruct()