luisgabrielroldan

luisgabrielroldan

Hi community!

This is my first post in the forum! (Hope I’m doing it well :sweat_smile:)
I want to share with you a project I’ve been working since a couple of weeks.

Some months ago I started to work on a driver for OLED displays based on SSD1306 (very popular and cheap!). It worked, had some primitives to draw points and lines… but that’s not quite useful.
On a second release I added a Scenic driver and the result is nice for graphics, but the text doesn’t looks well because of the antialiasing…

So this week I released the first version of Chisel :tada:, a library that can be used to write text on any device based on pixels (OLED, LCD, a LED Matrix).

Chisel is basically composed by two parts: a Font loader and a Renderer.

The only format supported for now is BDF which is a format for storing bitmap fonts (I want to add support for PCF in the future).

The use is pretty simple:

  1. Load the font…
{:ok, font} = Chisel.Font.load("you/font/file.bdf")
  1. … and write the text.
Chisel.Renderer.draw_text("Hello World!", x, y, font, put_pixel)

So… what is put_pixel?
Is just a function that is called with the coordinates of the pixel to paint.

  put_pixel = fn x, y ->
    device.draw_pixel(x, y)
  end

Here there are some examples using OLED and some fonts from U8glib:

Samples using OLED lib

And that’s all! What do you think? Did you have this text rendering requirements ever?

I would love to hear some feedback!

Thanks @lawik for testing the first prototype with [Inky] (GitHub - pappersverk/inky: A library for managing Inky e-ink displays from Elixir. · GitHub)!

I hope you can found it useful and to see many people crafting things with tiny displays!

Thanks!

Showing Posts 1 to 6

AstonJ

AstonJ

This is so cool! I love the display showing the emojis :003:

Is this the module you are using?

https://www.amazon.co.uk/Hobby-Components-Ltd-SSD1306-Electronics/dp/B00KCM9JMG

LukeWood

LukeWood

Super awesome love it!

luisgabrielroldan

luisgabrielroldan OP

Yes! That one works with the OLED library.

lawik

lawik

Nerves Core Team

I love that you made this thing. Absolutely wildly useful for small display projects. As you know there is plenty more I want us to try based off of this :slight_smile:

jaimeiniesta

jaimeiniesta

Hey @luisgabrielroldan that’s cool!

Do you think that would work with a Zio Qwiic OLED Display which is based on an SSD1327 chip?

I’m looking to attach an OLED to my Raspberry Pi Zero and it needs to be a Qwiic device because I’m using the Qwiic pHat connector already.

lawik

lawik

Nerves Core Team

This here links to datasheets. That should help sus out if they are very different.

Chisel can make the pixels but the I assume the display driver is I2C and that will work/not work depending on what they did to it when they gave it a bigger number :slight_smile:

Addresses might be different. There should be more stuff to write if the resolution is higher and so on.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews