# adafruit/adafruit_sh110x architecture

> Architecture diagram of the GitHub repository adafruit/adafruit_sh110x, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adafruit/adafruit_sh110x
- Repository: https://github.com/adafruit/adafruit_sh110x

## Overview

This is an Arduino driver library for monochrome SH1106G/SH1107 OLEDs. An application initializes a model-specific display, uses inherited Adafruit_GFX drawing operations to update its RAM buffer, then calls display() to transfer changed pixels over I2C or SPI. The model drivers provide initialization sequences; shared SH110X code handles buffered refresh. The README documents the Adafruit_GFX dependency. The examples are not mapped as product components; implementation details are based on the sampled source excerpts.

Main entry points: [`Adafruit_SH110X.cpp`](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH110X.cpp) (SH110X refresh), [`Adafruit_SH1106G.cpp`](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH1106G.cpp) (SH1106G driver), [`Adafruit_SH1107.cpp`](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH1107.cpp) (SH1107 driver), [`Adafruit_SH110X.h`](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH110X.h) (SH110X API)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_application(("Arduino application"))
node_sh1106g["SH1106G driver"]
node_sh1107["SH1107 driver"]
node_shared["SH110X refresh"]
node_interface["SH110X API<br/>[Adafruit_SH110X.h]"]
node_gfx["Adafruit_GFX"]
node_splash["Splash bitmap data<br/>[splash.h]"]
node_i2c(("I2C bus"))
node_spi(("SPI bus"))

node_application -->|"initializes and draws"| node_sh1106g
node_application -->|"initializes and draws"| node_sh1107
node_application -->|"refreshes buffer"| node_shared
node_sh1106g -->|"implements"| node_interface
node_sh1107 -->|"implements"| node_interface
node_interface -->|"extends"| node_gfx
node_sh1106g -->|"inherits and configures"| node_shared
node_sh1107 -->|"inherits and configures"| node_shared
node_sh1106g -->|"draws bitmap"| node_splash
node_sh1107 -->|"draws bitmap"| node_splash
node_shared -->|"writes display data"| node_i2c
node_shared -->|"writes display data"| node_spi

click node_sh1106g "https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH1106G.cpp"
click node_sh1107 "https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH1107.cpp"
click node_shared "https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH110X.cpp"
click node_interface "https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH110X.h"
click node_splash "https://github.com/adafruit/adafruit_sh110x/blob/master/splash.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_application,node_gfx,node_i2c,node_spi toneIndigo
class node_sh1106g,node_sh1107,node_shared,node_splash toneTeal
class node_interface toneMint
```

## Components

### Other components

- **Arduino application**
- [SH1106G driver](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH1106G.cpp): `Adafruit_SH1106G.cpp`
- [SH1107 driver](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH1107.cpp): `Adafruit_SH1107.cpp`
- [SH110X refresh](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH110X.cpp): `Adafruit_SH110X.cpp`
- [SH110X API](https://github.com/adafruit/adafruit_sh110x/blob/master/Adafruit_SH110X.h): `Adafruit_SH110X.h`
- **Adafruit_GFX**
- [Splash bitmap data](https://github.com/adafruit/adafruit_sh110x/blob/master/splash.h): `splash.h`
- **I2C bus**
- **SPI bus**

## Connections

- Arduino application → SH1106G driver: initializes and draws (evidence: `Adafruit_SH1106G.cpp`)
- Arduino application → SH1107 driver: initializes and draws (evidence: `Adafruit_SH1107.cpp`)
- Arduino application → SH110X refresh: refreshes buffer (evidence: `Adafruit_SH110X.cpp`)
- SH1106G driver → SH110X API: implements (evidence: `Adafruit_SH110X.h`)
- SH1107 driver → SH110X API: implements (evidence: `Adafruit_SH110X.h`)
- SH110X API → Adafruit_GFX: extends (evidence: `Adafruit_SH110X.h`)
- SH1106G driver → SH110X refresh: inherits and configures (evidence: `Adafruit_SH1106G.cpp`)
- SH1107 driver → SH110X refresh: inherits and configures (evidence: `Adafruit_SH1107.cpp`)
- SH1106G driver → Splash bitmap data: draws bitmap (evidence: `Adafruit_SH1106G.cpp`)
- SH1107 driver → Splash bitmap data: draws bitmap (evidence: `Adafruit_SH1107.cpp`)
- SH110X refresh → I2C bus: writes display data (evidence: `Adafruit_SH110X.cpp`)
- SH110X refresh → SPI bus: writes display data (evidence: `Adafruit_SH110X.cpp`)
