From e73d8ca3305d82ed026708a1ed911f703a2ee2db Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Fri, 13 Jun 2014 14:04:04 +0200 Subject: [PATCH] Moved pindefs for examples to GLOBALS.php --- examples/GLOBALS.php | 7 +++++++ examples/basic.php | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 examples/GLOBALS.php 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)