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->write(0xFF);
$par->write(0x00);
for($n = 0; $n < 10; $n++) {
$par->write(0xFF);
usleep(500000);
$par->write(0x00);
usleep(500000);
}

View File

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