From 429932bf4b0c16635abf7c769943e79c4e569f0d Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Thu, 12 Jun 2014 01:23:52 +0200 Subject: [PATCH] Fixed paths in gpio constructor --- lib/Gpio.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Gpio.php b/lib/Gpio.php index 3e36423..ff88664 100644 --- a/lib/Gpio.php +++ b/lib/Gpio.php @@ -30,10 +30,10 @@ class Gpio implements \ArrayAccess public function __construct() { - if (!file_exists("/sys/gpio")) { + if (!file_exists("/sys/class/gpio")) { throw new HardwareException("gpio sysfs is not available"); } - if (!is_writable("/sys/gpio/export")) { + if (!is_writable("/sys/class/gpio/export")) { throw new HardwareException("gpio sysfs is not writable"); } }