PHPackages                             timesplinter/gphpio - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. timesplinter/gphpio

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

timesplinter/gphpio
===================

Library to handle GPIO

033PHP

Since Jan 29Pushed 8y agoCompare

[ Source](https://github.com/TiMESPLiNTER/gphpio)[ Packagist](https://packagist.org/packages/timesplinter/gphpio)[ RSS](/packages/timesplinter-gphpio/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

gphpio
======

[](#gphpio)

This library provides a nice OO interface to interact with the GPIO pins of RaspberryPi (2).

Setup
-----

[](#setup)

For RaspberryPi (2) please make sure that the files at `/sys/class/gpio` are owned by `root:gpio` and that the user which executes the PHP script using this library is also in the group `gpio`. This should be the case anyway as long as you have already run the `raspi-config` tool on installation.

Else you may need to apply the following changes [described here](http://www.element14.com/community/message/139528/l/re-piface-digital-2--setup-and-use#139528).

Example
-------

[](#example)

The "Hello world" LED-blink script would look like that:

```
$model = new RPi();
$gpio = new GPIO($model);
$pin = 17;

if($gpio->isExported($pin) === false)
	$gpio->export($pin, GPIO::MODE_OUTPUT);

echo 'This is a ' , $model->getName() , PHP_EOL;

for($i = 0; $i < 10; ++$i) {
	$gpio->write($pin, 1);
	echo 'The pin is now: ' , $gpio->read($pin) , PHP_EOL;
	sleep(1);

	$gpio->write($pin, 0);
	echo 'The pin is now: ' , $gpio->read($pin) , PHP_EOL;
	sleep(1);
}

$gpio->unexport($pin);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/598854?v=4)[Pascal Münst](/maintainers/TiMESPLiNTER)[@TiMESPLiNTER](https://github.com/TiMESPLiNTER)

---

Top Contributors

[![TiMESPLiNTER](https://avatars.githubusercontent.com/u/598854?v=4)](https://github.com/TiMESPLiNTER "TiMESPLiNTER (17 commits)")[![1rover1](https://avatars.githubusercontent.com/u/5093819?v=4)](https://github.com/1rover1 "1rover1 (1 commits)")

### Embed Badge

![Health badge](/badges/timesplinter-gphpio/health.svg)

```
[![Health](https://phpackages.com/badges/timesplinter-gphpio/health.svg)](https://phpackages.com/packages/timesplinter-gphpio)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
