PHPackages                             embedded-php/i2c - 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. embedded-php/i2c

ActivePhp-ext[Utility &amp; Helpers](/categories/utility)

embedded-php/i2c
================

An object-oriented wrapper to the i2c-dev Linux Kernel driver

431[2 PRs](https://github.com/embedded-php/ext-i2c/pulls)CCI passing

Since Dec 23Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/embedded-php/ext-i2c)[ Packagist](https://packagist.org/packages/embedded-php/i2c)[ RSS](/packages/embedded-php-i2c/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

I2C PHP Extension
=================

[](#i2c-php-extension)

The I2C PHP Extension provides an object-oriented wrapper to the [i2c-dev](https://www.kernel.org/doc/Documentation/i2c/dev-interface) Linux Module that gives users the ability to write code that interacts with external hardware using the [I2C](https://en.wikipedia.org/wiki/I%C2%B2C) protocol.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.0 (either NTS or ZTS version);
- libi2c-dev;

> **Note:** if you are using this extension on Raspbian or Raspberry Pi OS, the user executing the script **must**belong to the **i2c** group or you may run into "Permission denied" errors.

On **Raspbian** or **Raspberry Pi OS**:

**PHP 8.0**:

```
sudo apt install php8.0-cli php8.0-dev php8.0-phpdbg libi2c-dev
```

**PHP 8.1**:

```
sudo apt install php8.1-cli php8.1-dev php8.1-phpdbg libi2c-dev
```

Building
--------

[](#building)

```
phpize
./configure
make
make test
```

Stubs
-----

[](#stubs)

After changing any of the [stubs](stubs/), the main [stub file](phpi2c.stub.php) must be updated by running the command below.

```
php stubs/update-main-stup.php
```

Once the stub is updated, the regular build process can be executed.

**Note:** The main stub file ([phpi2c.stub.php](phpi2c.stub.php)) is a generated file, edit the files on the [stubs](stubs/) folder instead.

Classes
-------

[](#classes)

ClassDescription[I2C\\Bus](stubs/Bus.php)Represents a I2C Bus.[I2C\\Exception](stubs/Exception.php)Base exception.Resources
---------

[](#resources)

-

License
-------

[](#license)

This library is licensed under the [PHP License](LICENSE).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance53

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 68.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://www.gravatar.com/avatar/42b9c9cbc06973a61587667fc811b853f4d71843f35ba2535f3900083e69ab3f?d=identicon)[flavioheleno](/maintainers/flavioheleno)

---

Top Contributors

[![flavioheleno](https://avatars.githubusercontent.com/u/471860?v=4)](https://github.com/flavioheleno "flavioheleno (13 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")

---

Tags

hacktoberfesti2ci2c-libraryphpphp-extension

### Embed Badge

![Health badge](/badges/embedded-php-i2c/health.svg)

```
[![Health](https://phpackages.com/badges/embedded-php-i2c/health.svg)](https://phpackages.com/packages/embedded-php-i2c)
```

###  Alternatives

[sheadawson/silverstripe-responsive-wysiwyg-images

Extends silverstripe-responsive-images to allow responsive images in WYSIWYG editor.

111.6k](/packages/sheadawson-silverstripe-responsive-wysiwyg-images)

PHPackages © 2026

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