From 0d167005117fc5d43f59144abc07b3b7a7f9cb8e Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Thu, 12 Jun 2014 12:19:22 +0000 Subject: [PATCH] Updated basic example --- examples/basic.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/basic.php b/examples/basic.php index f713e7f..68e517d 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -2,6 +2,13 @@ require_once __DIR__."/../vendor/autoload.php"; +/* + * This example will flash a led connected on pin 0 (GPIO17 on a Pi). If you are + * not on a Pi, please change (or remove) the mapper below and update the pin + * numbers to match. + * + */ + use NoccyLabs\Gpio\Gpio; use NoccyLabs\Gpio\GpioMapper\WiringPiMapper; @@ -23,6 +30,7 @@ $led = $gpio[0] ->setLabel("LED pin") ->setValue(0); +// Flash the led $x = 0; while(true) { $x = (int)(!$x);