diff --git a/examples/GLOBALS.php b/examples/GLOBALS.php new file mode 100644 index 0000000..b4ddf64 --- /dev/null +++ b/examples/GLOBALS.php @@ -0,0 +1,7 @@ +setMapper( new WiringPiMapper(2) ); // Access logical pin 0, since we got a mapper assigned. Otherwise this would // be the actual GPIO0 pin. -$led = $gpio[0] +$led = $gpio[LED_A] ->export() ->setEdge(Gpio::EDGE_NONE) ->setDirection(Gpio::DIR_OUT)