diff --git a/lib/GpioPin.php b/lib/GpioPin.php index e13669e..01c91ab 100644 --- a/lib/GpioPin.php +++ b/lib/GpioPin.php @@ -45,7 +45,7 @@ class GpioPin public function __construct($pin) { $this->pin = (int)$pin; - $this->fd = fopen("/sys/class/gpio/gpio{$pin}/value", "rb"); + $this->export(); } public function __destruct()