| Recommend this page to a friend! | 
| Classes of Rafael Martin Soto | PHP Led Raspberry PI | README.md | Download | 
  | 
|||||||||||||||||||||
led_raspberryClass for manage directly leds on raspberry pi in PHPWe can access GPIO ports directly with fwrite() for power on|off leds, without use shell_exec() function. The result is a fasted library to access GPIO ports. This one is written to manage LEDS, but with a litlle changes you can use it for other components (buttons, relay, ....) # REQUERIMENTS: - A minimum (minimum, minimum, minimum requeriments is needed). Tested on: 
# FILES: There are 2 files: led.class.php -> Master class. This file is the main file that you need to include in your code. example.php -> Code with example use of the class # INSTALLATION: A lot of easy :smiley:. It is written in PURE PHP. Only need to include the files. Tested on basic PHP installation 
# BASIC USAGE: - Create the variable with led class on GPIO 18: 
- Power ON GPIO led 18: - Power OFF GPIO led 18: 
- Unexport GPIO port 18: 
RESUME OF METHODS:CREATE LED ON GPIO PORT 'X': 
 Without file handles: 
With file handles: 
Power ON led: 
Power OFF led: 
Unexport GPIO PORT: 
Example
Of course. You can use it freely :vulcan_salute::alien: By Rafa. @author Rafael Martin Soto @author {@link http://www.inatica.com/ Inatica} @blog {@link https://rafamartin10.blogspot.com/ Rafael Martin's Blog} @since July 2021 @version 1.0.0 @license GNU General Public License v3.0  |