Moved pindefs for examples to GLOBALS.php
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
require_once __DIR__."/../vendor/autoload.php";
 | 
			
		||||
require_once __DIR__."/GLOBALS.php";
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This example will flash a led connected on pin 0 (GPIO17 on a Pi). If you are
 | 
			
		||||
@@ -23,7 +24,7 @@ $gpio->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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user