PHPackages                             dept-of-scrapyard-robotics/ssd1306 - 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. [Framework](/categories/framework)
4. /
5. dept-of-scrapyard-robotics/ssd1306

ActiveLibrary[Framework](/categories/framework)

dept-of-scrapyard-robotics/ssd1306
==================================

Drive SSD1306 Monochrome displays over I2C/SPI with PHP

0.4.3(yesterday)00MITPHPPHP ^8.3

Since Dec 27Pushed yesterdayCompare

[ Source](https://github.com/DeptOfScrapyardRobotics/SSD1306)[ Packagist](https://packagist.org/packages/dept-of-scrapyard-robotics/ssd1306)[ Docs](https://dosr.projectsaturnstudios.com)[ RSS](/packages/dept-of-scrapyard-robotics-ssd1306/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (7)Used By (0)

Introduction
============

[](#introduction)

PHP Package for the SSD1306 Monochrome OLED display.

Compatible I2C Interfaces
=========================

[](#compatible-i2c-interfaces)

The SSD1306 display communicates with your device over I2C, the InterIntegrated Circuit Protocol.

You can interface with displays such as the SSD1306 with this package the following ways:

- A Linux Single-Board Computer's exposed GPIO pins using the dedicated I2C SDA/SCL pins
- An MPSSE-enabled USB-to-Serial device such as an FT232H generally using D0 and SCL and D1 for SDA connected to nearly any Linux or MacOS USB port.

Compatible SPI Interfaces
=========================

[](#compatible-spi-interfaces)

The SSD1306 display also supports SPI, the Serial Peripheral Interface.

You can interface with displays such as the SSD1306 over SPI with this package the following ways:

- A Linux Single-Board Computer's exposed GPIO pins using the dedicated SPI MOSI/SCK and CS pins as well as 2 GPIO pins for DC and RST.
- An MPSSE-enabled USB-to-Serial device such as an FT232H generally using D0 and SCK, D1 for MOSI, D2 for MISO and D3 for CS, D4 and D5 for RST/DC and connected to nearly any Linux or MacOS USB port.

Dependencies
============

[](#dependencies)

This package makes use of modules within:

- [The ScrapyardIO Framework](https://github.com/ScrapyardIO/framework)

This package also requires one of the following extensions in order to interface with I2C/SPI

- [POSI Extension v^0.4.0 or newer](https://github.com/php-io-extensions/posi)
- [FTDI Extension v^0.4.0 or newer](https://github.com/php-io-extensions/ftdi)

In addition, an extension wrapper package is needed

For ext-posi

- [Microscrap POSIX Package v0.4.0 or newer](https://github.com/microscrap/posix)
- [Microscrap Native I2C Package v0.4.0 or newer](https://github.com/microscrap/i2c)
- [Microscrap Native SPI Package v0.4.0 or newer](https://github.com/microscrap/spi)
- [Microscrap Native GPIO Package v0.4.0 or newer](https://github.com/microscrap/gpio)

For ext-ftdi

- [Microscrap FTDI Package v0.4.0 or newer](https://github.com/microscrap/ftdi)
- [Microscrap MPSSE Package v0.4.0 or newer](https://github.com/microscrap/mpsse)

Installing from Composer
========================

[](#installing-from-composer)

Inside the root of your PHP Project, simply require the BMP package from composer

```
composer require dept-of-scrapyard-robotics/ssd1306
```

Framework Configuration
=======================

[](#framework-configuration)

If you would like to use the ScrapyardIO Framework to bootstrap your display without wasting lines configuring your display right in the script you can add your desired configuration to scrapyard-io.php, such as in this example:

### I2C

[](#i2c)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\Enums\SSD1306I2CAddress

return [
    'displays' => [
        // For Native Configurations
        'ssd1306-native' => [
            'class_name' => SSD1306::class,
            'connection' => ['driver' => 'native'],
            'startup' => [
                'i2c' => [
                    'chip_device' => 1,
                    'slave_address' => SSD1306I2CAddress::SAO_GROUNDED->value,
                ],
            ],
        ],
        // For USB Configurations
        'ssd1306-usb' => [
            'class_name' => SSD1306::class,
            'connection' => ['driver' => 'usb'],
            'startup' => [
                'i2c' => [
                    'chip_device' => 'ft232h',
                    'slave_address' => SSD1306I2CAddress::SAO_GROUNDED->value,
                ],
            ],
        ],
    ]
];
```

### SPI

[](#spi)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;

return [
    'displays' => [
        // For Native Configurations
        'ssd1306-native' => [
            'class_name' => SSD1306::class,
            'connection' => ['driver' => 'native'],
            'startup' => [
                'spi' => [
                    'master' => 0,
                    'chip_select' => 0,
                ],
            ],
        ],
        // For USB Configurations
        'ssd1306-usb' => [
            'class_name' => SSD1306::class,
            'connection' => ['driver' => 'usb'],
            'startup' => [
                'spi' => [
                    'master' => 'ft232h',
                    'chip_select' => 0,
                ],
            ],
        ],
    ]
];
```

Basic Usage
===========

[](#basic-usage)

### Native (POSIX) I2C driver. (Single Board Computers)

[](#native-posix-i2c-driver-single-board-computers)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\Enums\SSD1306I2CAddress;

$native_i2c_display = SSD1306::connection('native')
    ->i2c(1, SSD1306I2CAddress::SAO_GROUNDED->value)
    ->create()
```

### Native (POSIX) SPI driver. (Single Board Computers)

[](#native-posix-spi-driver-single-board-computers)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;

$native_spi_display = SSD1306::connection('native')
    ->spi(0,0)
    ->gpiochip(0)
    ->dc(22)
    ->rst(24)
    ->create()
```

### USB (MPSSE) driver using I2C. (Linux and MacOS)

[](#usb-mpsse-driver-using-i2c-linux-and-macos)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\Enums\SSD1306I2CAddress;

$usb_i2c_display = SSD1306::connection('usb')
    ->i2c('ft232h', SSD1306I2CAddress::SAO_GROUNDED->value)
    ->create()
```

### USB (MPSSE) driver using SPI. (Linux and MacOS)

[](#usb-mpsse-driver-using-spi-linux-and-macos)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;

$usb_spi_display = SSD1306::connection('usb')
    ->spi('ft232h',0)
    ->gpiochip('ft232h')
    ->rst(0)
    ->dc(1)
    ->create()
```

Alternative Usage
-----------------

[](#alternative-usage)

### Using Through the Display Library (as a MonochromeDisplay)

[](#using-through-the-display-library-as-a-monochromedisplay)

```
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\SSD1306;
use RealityInterface\Displays\Applied\Monochrome\MonochromeDisplay;
use DeptOfScrapyardRobotics\Displays\SSD1306\SSD1306\Enums\SSD1306I2CAddress;

$ssd1306 = SSD1306::connection('native')
    ->i2c(1, SSD1306I2CAddress::SAO_GROUNDED->value)
    ->create()

$display = MonochromeDisplay::as($ssd1306);
```

### Using Through the Display Framework (with an autoloaded config) (as a MonochromeDisplay)

[](#using-through-the-display-framework-with-an-autoloaded-config-as-a-monochromedisplay)

```
use RealityInterface\Displays\Applied\Monochrome\MonochromeDisplay;

$sensor = MonochromeDisplay::using('ssd1306');

```

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~42 days

Total

6

Last Release

1d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10563160?v=4)[Angel Gonzalez](/maintainers/projectsaturnstudios)[@projectsaturnstudios](https://github.com/projectsaturnstudios)

---

Tags

frameworkscrapyard-io

### Embed Badge

![Health badge](/badges/dept-of-scrapyard-robotics-ssd1306/health.svg)

```
[![Health](https://phpackages.com/badges/dept-of-scrapyard-robotics-ssd1306/health.svg)](https://phpackages.com/packages/dept-of-scrapyard-robotics-ssd1306)
```

###  Alternatives

[pestphp/pest-plugin-stressless

Stressless plugin for Pest

68943.9k18](/packages/pestphp-pest-plugin-stressless)

PHPackages © 2026

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