You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
377 B
PHP
19 lines
377 B
PHP
<?php
|
|
|
|
require_once __DIR__."/../vendor/autoload.php";
|
|
require_once __DIR__."/GLOBALS.php";
|
|
|
|
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) {
|
|
}
|