Bugfixed gpio, improved bitmap example script
This commit is contained in:
parent
477ea2605d
commit
755552a9a6
@ -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);
|
||||
}
|
||||
|
@ -76,8 +76,10 @@ class GpioPin
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
if ($this->fd) {
|
||||
fclose($this->fd);
|
||||
}
|
||||
}
|
||||
|
||||
public function setDirection($direction)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user