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] ->export() ->setDirection("input") ->setEdge("rising") ->setHandler(function($e) use($gpio) { }) ->setLabel("rfint") ->dumpStatus(true); for($n = 1; $n < 5; $n++) { $gpio[$n] ->setDirection("input") ->setLabel("rfbt{$n}") ->dumpStatus(true); }