Skip to content

Commit

Permalink
Missing push operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
allebb committed Aug 22, 2017
1 parent 0340dda commit 24b8a9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Adapters/RPiAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class RPiAdapter implements AdapterInterface
public function setDirection(int $pin, string $direction): bool
{
$this->export($pin);

system("echo {$direction} > /sys/class/gpio/gpio{$pin}/direction");

if (!file_exists("/sys/class/gpio/gpio{$pin}/direction")) {
Expand All @@ -50,7 +50,7 @@ public function setDirection(int $pin, string $direction): bool
*/
public function write(int $pin, int $value): bool
{
system("echo {$value} /sys/class/gpio/gpio{$pin}/value");
system("echo {$value} > /sys/class/gpio/gpio{$pin}/value");

if (!file_exists("/sys/class/gpio/gpio{$pin}/value")) {
return false;
Expand Down

0 comments on commit 24b8a9b

Please sign in to comment.