View on GitHub

1106-OLED-Driver-Classroom-Ready

An OLED driver for the 1.3" 1106 variation often found on cheap websites labelled as1306 compatible

Micro:bit SH1106 OLED Extension

A graphics and text extension for SH1106 128×64 I2C OLED displays on the BBC micro:bit.

This extension was designed for classroom use with beginner-friendly blocks as well as more advanced drawing tools.


Open in MakeCode

Open this project in MakeCode:

https://gbhobbytech.github.io/1106-oled-test/


Supported Hardware

Tested with:

Example display label:

1.3" IIC v2.1

Important

This extension is designed for SH1106 displays.

It is not intended for SSD1306 displays.

The SH1106 uses a different internal memory layout and requires different addressing.


Wiring

OLED Pin micro:bit Pin
VCC 3V
GND GND
SDA P20
SCL P19

Tested using:

Notes


Use as Extension

This repository can be added as an extension in MakeCode.

  1. Open https://makecode.microbit.org/
  2. Create a New Project
  3. Open Extensions
  4. Search for:
https://github.com/gbhobbytech/1106-oled-test
  1. Import the extension

Edit This Project

To edit this repository directly in MakeCode:

  1. Open https://makecode.microbit.org/
  2. Click Import
  3. Click Import URL
  4. Paste:
https://github.com/gbhobbytech/1106-oled-test
  1. Click Import

Beginner Example

initialise OLED
show text "HELLO" x 10 y 20 size 2

This is the easiest way to get started.


Advanced Example

initialise OLED
clear drawing

draw rectangle x 0 y 0 width 127 height 63 on true
draw circle x 64 y 32 radius 20 on true
draw text "OLED" x 40 y 10 size 1 on true

update OLED

Understanding the Graphics System

This extension uses a framebuffer graphics system.

Simple Workflow

clear → draw → update OLED

Drawing blocks modify memory first.

update OLED sends the completed image to the screen.

This allows:


Block Groups

Basic

Drawing

Advanced


Features

Current features include:


Known Limitations


Future Ideas

Possible future additions:


Credits

Developed as part of a classroom-focused OLED graphics project for the BBC micro:bit.

Built using:


Metadata

Used for MakeCode search and rendering.

<script src="https://makecode.com/gh-pages-embed.js"></script>
<script>
makeCodeRender(
    "https://makecode.microbit.org/",
    "gbhobbytech/1106-OLED-Driver-Classroom-Ready"
);
</script>