【文件属性】:
文件名称:GPIO:一个PHP库,用于访问Raspberry Pi上的GPIO引脚
文件大小:11KB
文件格式:ZIP
更新时间:2021-04-23 02:59:10
PHP
PiPHP:GPIO
用于低级访问Raspberry Pi上的GPIO引脚的库。 这些引脚可用于控制输出(LED,电机,阀门,泵)或读取输入(传感器)。
英国
正在安装
使用:
composer require piphp/gpio
或者:
php composer.phar require piphp/gpio
例子
设置输出引脚
use PiPHP \ GPIO \ GPIO ;
use PiPHP \ GPIO \ Pin \ PinInterface ;
// Create a GPIO object
$ gpio = new GPIO ();
// Retrieve pin 18 and configure it as an output pin
$ pin = $ gpio -> getOutputPin ( 18 );
// Set the value of th
【文件预览】:
GPIO-master
----README.md(2KB)
----.github()
--------workflows()
----LICENSE(1KB)
----composer.json(714B)
----CONTRIBUTING.md(238B)
----src()
--------GPIOInterface.php(672B)
--------Interrupt()
--------Pin()
--------FileSystem()
--------GPIO.php(2KB)