Skip to content

Volantus/php-pigpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pigpio client library for PHP

Latest Stable Version Build status

PHP client for the great Pigpio daemon library

‼️ Alpha status:

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!

Installation

Library may be installed by using Composer:

composer require volantus/php-pigpio

Features

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

Basic usage

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));

Starting the Pigpio daemon

If the daemon is not running already, it can simply be started via:

sudo pigpiod

Contribution

Contributors are highly welcome! Please report bugs, ask questions and create feature requests :)

Pull requests

Three simple rules:

  1. Write Tests
  2. Follow the project code style
  3. Use feature branches/forks and pull requests