Oled
OLED is a library to manage the monochrome OLED screen based on chip SSD1306 using SPI/I2C comunication.
Install / Use
/learn @pappersverk/OledREADME
OLED
OLED is a library to manage the monochrome OLED screen based (for now) on chip SSD1306 connected by SPI or I2C.
The idea is to support other similar chips also.
NOTE: On OLED v0.3.0 the Scenic driver has been moved to scenic_driver_oled.

Features
Graphic primitives
- [x] Points
- [x] Lines
- [x] Rects
- [x] Filled Rects
- [x] Circles
- [ ] Filled Circles
- [ ] Polygons
- [ ] Filled Polygons
- [ ] Text rendering (Try Chisel)
Basic Setup
1. edit your mix.exs
def deps do
[
{:oled, "~> 0.3"}
]
end
2. create a display module
defmodule MyApp.MyDisplay do
use OLED.Display, app: :my_app
end
3. add the configuration
config :my_app, MyApp.MyDisplay,
device: "spidev0.0",
driver: :ssd1306,
type: :spi,
width: 128,
height: 64,
rst_pin: 25,
dc_pin: 24
4. add your application's supervision tree
defmodule MyApp.Application do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
# Add this line
MyApp.MyDisplay
]
opts = [strategy: :one_for_one, name: MyApp.Supervisor]
Supervisor.start_link(children, opts)
end
end
5. use it
# Draw something
MyApp.MyDisplay.rect(0, 0, 127, 63)
MyApp.MyDisplay.line(0, 0, 127, 63)
MyApp.MyDisplay.line(0, 63, 127, 0)
# Display it!
MyApp.MyDisplay.display()
Displays configuration
config :my_app, MyApp.MyDisplay,
device: "spidev0.0", # Device (i.e.: `spidev0.0`, `i2c-1`, ...)
driver: :ssd1306, # Driver. (Only SSD1306 for now)
type: :spi, # Connection type: `:spi` or `:i2c`
width: 128, # Display Width
height: 64, # Display Height
rst_pin: 25, # Reset GPIO pin (SPI only)
dc_pin: 24 # DC GPIO pin (SPI only)
address: 0x3C # DC GPIO pin (I2C only)
Related Skills
node-connect
354.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
