rpi / pigpio
Library for the Raspberry Pi.
0.0.1
2020-11-07 15:05 UTC
Requires
- php: ^8.0
- serafim/ffi-loader: ^1.0
Requires (Dev)
- phpunit/phpunit: ^9.4
This package is auto-updated.
Last update: 2025-03-08 00:38:01 UTC
README
PHP bindings to the pigpio C library.
Requirements
- PHP >= 8.0
- PHP FFI extension available
- pigpio
Installation
composer require rpi/pigpio
Example:
require __DIR__ . '/vendor/autoload.php'; use Serafim\FFILoader\Loader; use Rpi\Pigpio\Library; $loader = new Loader(); $ffi = $loader->load(new Library())->ffi; $ffi->gpioInitialise(); $ffi->gpioWrite(14, 1); $ffi->gpioTerminate();