From 0fab790ac2449f7bff7247bf782a352a369991c9 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Thu, 12 Jun 2014 01:57:10 +0200 Subject: [PATCH] bugfixes to gpiopin --- lib/GpioPin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/GpioPin.php b/lib/GpioPin.php index 01c91ab..3ed9b07 100644 --- a/lib/GpioPin.php +++ b/lib/GpioPin.php @@ -59,7 +59,7 @@ class GpioPin throw new \Exception; } $this->direction = $direction; - file_put_contents("/sys/class/gpio/{$this->pin}/direction", $direction); + file_put_contents("/sys/class/gpio/gpio{$this->pin}/direction", $direction); return $this; } @@ -71,7 +71,7 @@ class GpioPin public function setValue($value) { $this->value = (bool)$value; - file_put_contents("/sys/class/gpio/{$this->pin}/value", (int)$this->value); + file_put_contents("/sys/class/gpio/gpio{$this->pin}/value", (int)$this->value); return $this; } @@ -112,7 +112,7 @@ class GpioPin throw new \Exception; } $this->edge = $edge; - file_put_contents("/sys/class/gpio/{$this->pin}/edge", $edge); + file_put_contents("/sys/class/gpio/gpio{$this->pin}/edge", $edge); return $this; }