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

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
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
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
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
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews