This time we will add an ILI9486 via SPI support to our C code. And while doing it we will refactor structure and clean up the code (or do more mess :P).
I was thinking that C wrapper should be part of GfxLCD package but maybe it is better to create it as a separate module? We will see but this time the code is available @GitHub.
– GFXLCD AND ILI9325 C DRIVER – PART 2
– GFXLCD AND ILI9325 C DRIVER – PART 1
This time we will work with drawing functions. Displaying pixel is easy but next, we have a line, circle and arc. I wonder how hard or easy moving functions from Python to C gonna be.
In Python implementation of GfxLCD, we use @property to access width, height or set colours. We need to do same with C implementation. I see two ways, one we will use Python class that would translate property to function call in C or maybe we can use some ability of Python-C wrapper.
GfxLCD and ILI9325 C driver – part 1
We know that we can get a decent performance with C and ILI based display, so let’s make the next step and add ili9325 and the ili9486 driver written in C to our GfxLCD package.
There is no repository for now – sorry 🙂
I have some crazy idea but before we need to do something with GfxLCD performance. Using ILI9325 with Python is a way to slow:
pi@raspberrypi2b:~/workspace/gfxlcd/gfxlcd/demos $ time python3 ili9325.py
Filling screen with size 240×320 in 14s is not impressive. Let’s see what happens when we move a layer down to C.
Some time ago an opportunity knocked on my door. A friend needs a device that would read a card, send the id to the server and react to response.
Today we will work on code and create a class and a handler for the RC522 module.
Module and handler added to NodeMCU boilerplate @ GitHub
To use our beautiful ILi9325 display with ProxyLCD we need to manually edit settings.ini. This is not a good way:) Why is that? Because we cannot set a proper size. We are using a selector with predefined values. We need to change it to two text fields.
And we need the formatters, what is that you may ask? You shall see 🙂
Last time we wrote an HD44780 driver that takes GfxLCD compatible display and works with CharLCD package. This is nice because we can use big ILI9486 as a character display.
You may ask, why?
Because with ProxyLCD we can see a big output from Symfony 🙂 And because we can 🙂
Today we will focus on two bugs from a previous part and we will see if all chipsets can work with HD44780 driver.
– Part 1
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 have a driver for ILI9486 320×480 display and we can run Doton on it. But currently, it would use only half of the screen. Our window manager has hard-coded dimension 240×320.
We need to do something with it. I think we can update manager to calculate grid from dimensions and additionally we can add tiles auto positioning.
Why? Because it seems that not setting position on the screen can be better 🙂 System can add pages when required and take care of horizontal vs vertical position.
But I think that we should be able to set coords if we want to.
Source code @ GitHub
My friend suggested me that I should write Doton in a .NET. A Huge challenge, I never thought about it but maybe we can do some research in this matter?
I installed Windows 10 IoT edition on my Raspi, started Visual Studio 2015 and.. stopped 😀 I had no idea what to do. Googling and I found something that was beautiful and crazy at the same time.
It was an information that we can use a Python… So maybe we can port a project to Windows 10 IoT? Let’s see!