Finally, something that is missing from the start, the ability to write some text on display. In Doton we needed an ability to display numbers and we have done it via images. It was a partial solution but good enough. But we want more 🙂
So this time fonts, text and another step in endless struggle with displaying anything anywhere 🙂
We can rotate both ILI displays but NJU and SSD are awaiting their turn. Let’s give them some attention and add rotation to them.
This will close another task on endless list of improvements 🙂
From what I see we should change drawing functions (recalculate coordinates) and flushing buffer should stay the same because it works directly on hardware.
During the work on GUI, I had to add a new function, ability to load and display an image. First, this post was a part of bigger one but I think it should be a post on its own.
I tried to display numbers but we have no ability to display a text. So I thought about using images and that’s why we are here:)
More drawing! Hurray! Our endless efforts for displaying anything anywhere bring the results 😀
The rectangle, the circle, the arc and as a bonus filled rectangle.
– part one
– part two
Code @ GitGub
Let’s move on. This time we will extract NJU6450 drivers and implement a line drawing.
– part one
– part three
– source @ GitHub
When we played with NJU and SSD LCDs we were operating on a page rather than pixels. It is performance wise because we can toggle as much as 8 pixels in one write. But drawing requires us to get current page status and mix it with a current operation.
Normally we would read data from the screen but there is one catch, they operate on 5V and this can kill Raspi.
So we will do it a different way. We will use a buffer to keep current state and we will work on it. When we are ready we will flush content to display. It may be more effective because we are skipping reads.
Code @ GitHub
Yey, another day with LCD. This time an OLED 0.96″ display with an SSD1306 chipset. Like with previous display, we will focus on learning how this works, how to initialize LCD and how to display something.
My OLED is a popular display, you can see it everywhere. It exists in a few variants most popular are with i2c bus or with SPI interface. It also varies in size, from 64×32 to 128×64.
My unit is 128×64 with SPI on the SSD1306 chipset. There are some fakes with an SH1106, almost same but with 132 pixels in width.
Now it is fascinating, this screen is twice bigger in the pixels that the one with NJU! And is much smaller! Woot technology.
I have chosen this LCD because it has SPI interface and OLED technology.