|
ssd1306xled 1.0.0
SSD1306/SSD1315/SSH1106 OLED driver for ATtiny85
|
You can test the library without any hardware using Wokwi, a browser-based electronics simulator. The simulation/ directory in the repository has everything pre-configured: a virtual ATtiny85 wired to an SSD1306 OLED, a PlatformIO build file, and a Makefile that ties it together.
make (the simulation Makefile uses it)make setup installs it for you)Install the Xcode command-line tools. This gives you make, git, and python3 in one step:
If you prefer Homebrew:
(make ships with the Xcode command-line tools, so Homebrew won't install it separately.)
VS Code can be installed from the website or with Homebrew:
build-essential includes make and gcc. VS Code is available as a .deb download from the website, or through Snap:
WSL2 (recommended) – install Ubuntu from the Microsoft Store, open it, and follow the Ubuntu steps above. VS Code on the Windows side connects to WSL automatically with the "Remote - WSL" extension.
Native – install these separately:
make – install through Chocolatey (choco install make) or Scoop (scoop install make)Wokwi: Request a new License, and follow the browser flow. This is free and only needs to be done once.Then install PlatformIO from the simulation/ directory:
This downloads and configures PlatformIO Core if it is not already installed.
Then open the simulation/ folder in VS Code and press F1 -> Wokwi: Start Simulator. The virtual OLED should light up and run through the demo.
The Makefile can build any example from the examples/ directory. Pass the folder name with EXAMPLE=:
make clean removes build artifacts and the src symlink.
| Example | What it shows |
|---|---|
OLED_demo | Fill patterns, text, bitmaps, and compositing |
sprite_overlap_fix | The bug from issue #19: sprite flicker on shared pages, and the compositing/clipping fix |
invaders_fix | Reproduces issue #19 with the reporter's game sprites: overlap bug, compositing fix, clipping fix, and a shooting demo with explosion animation |
tiny_gilbert | Platformer with 10 levels by Daniel Champagne (GPLv3). Needs potentiometer + button for full play; runs as display demo in simulator |
tiny_space_invaders | Space Invaders clone by Daniel Champagne (GPLv3). Same control requirements |
tiny_bomber | Bomberman with 3 levels by Daniel Champagne (GPLv3). Same control requirements |
fur_elise | Plays Fur Elise on the PB4 buzzer while showing scrolling note names on the display |
The simulation/ directory contains four files:
| File | Purpose |
|---|---|
Makefile | Wraps PlatformIO commands and handles example selection |
platformio.ini | Tells PlatformIO to build for ATtiny85 using the library at the repo root |
diagram.json | Wokwi circuit: ATtiny85 with SCL on PB2, SDA on PB0, wired to a 128x64 SSD1306 at address 0x3C |
wokwi.toml | Points the Wokwi simulator at the compiled .hex and .elf files |
When you run make build, the Makefile symlinks src/ to the chosen example directory under examples/, then calls pio run. The compiled firmware lands in .pio/build/attiny85/. The Wokwi extension reads wokwi.toml to find that firmware and diagram.json to set up the virtual circuit.