PHP client for the great Pigpio daemon library
Library is currently in Alpha status. Bugs may occur, library may be unstable, API may be changed anytime.
Feedback and bug reports are highly welcome!
Library may be installed by using Composer:
composer require volantus/php-pigpio
Currently the following features are fully implemented. If your desired Pigpio feature is not fully supported, you may use raw requests.
Feature | Status | Version |
---|---|---|
Notifications (e.g. GPIO changes) | ✔️ Fully supported | 0.1.1 |
Reading PWM signals | ✔️ Fully supported | 0.1.2 |
Sending PWM signals | ✔️ Fully supported | 0.3.0 |
SPI communication | ✔️ Fully supported | 0.2.0 |
Hall sensors rotation counter | ✔️ Fully supported | 0.2.5 |
Raw requests/response handling | ✔️ Fully supported | 0.1.1 |
This library is interacting with Pigpio by using sockets. The core communication is handled by the Client class:
use Volantus\Pigpio\Client;
use Volantus\Pigpio\Network\Socket;
$client = new Client(new Socket('127.0.0.1', 8888));
If the daemon is not running already, it can simply be started via:
sudo pigpiod
Contributors are highly welcome! Please report bugs, ask questions and create feature requests :)
Three simple rules:
- Write Tests
- Follow the project code style
- Use feature branches/forks and pull requests