2014-06-13 00:02:39 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once __DIR__."/../vendor/autoload.php";
|
2014-06-13 23:32:20 +00:00
|
|
|
require_once __DIR__."/GLOBALS.php";
|
2014-06-13 00:02:39 +00:00
|
|
|
|
|
|
|
use NoccyLabs\Gpio\GpioMapper\WiringPiMapper;
|
|
|
|
use NoccyLabs\Gpio\Exception\GpioException;
|
|
|
|
|
|
|
|
$mapper = new WiringPiMapper(2);
|
|
|
|
|
|
|
|
$pin = 0;
|
|
|
|
try {
|
|
|
|
while (($gpio = $mapper->mapLogicalToGpioPin($pin))) {
|
|
|
|
printf(" %3d = GPIO%d \n", $pin, $gpio);
|
|
|
|
$pin++;
|
|
|
|
}
|
|
|
|
} catch (GpioException $e) {
|
|
|
|
}
|