Bugfixed gpio, improved bitmap example script

This commit is contained in:
Chris 2014-06-12 20:38:46 +00:00
parent 477ea2605d
commit 755552a9a6
2 changed files with 9 additions and 3 deletions

View File

@ -20,5 +20,9 @@ for($n = 0; $n < 7; $n++) {
$par->setGpioPin($n,$gpio[$n]); $par->setGpioPin($n,$gpio[$n]);
} }
$par->write(0xFF); for($n = 0; $n < 10; $n++) {
$par->write(0x00); $par->write(0xFF);
usleep(500000);
$par->write(0x00);
usleep(500000);
}

View File

@ -76,8 +76,10 @@ class GpioPin
public function __destruct() public function __destruct()
{ {
if ($this->fd) {
fclose($this->fd); fclose($this->fd);
} }
}
public function setDirection($direction) public function setDirection($direction)
{ {