ILI9325

GFXLCD AND ILIs โ€“ PART 4 images in C

Today we will try and draw images from our C lib. This is the next step with the wrapper. Why? Because we will be sending Python Object to C code and use it there.

It is getting weirder ๐Ÿ™‚

Source @ GitHub

GFXLCD AND ILI9325 C DRIVER โ€“ PART 3
GFXLCD AND ILI9325 C DRIVER โ€“ PART 2
โ€“ย GFXLCD AND ILI9325 C DRIVER โ€“ PART 1

(more…)

Advertisements

GfxLCD and ILI9486 C driver โ€“ part 3

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

(more…)

GfxLCD and ILI9325 C driver – part 2

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

(more…)

ILI9325 in Python and C – performance

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
real    0m14.528s
user    0m14.080s
sys     0m0.070s

Filling screen with size 240×320 in 14s is not impressive. Let’s see what happens when we move a layer down to C.

(more…)

RemoteLCD Node on Raspberry Pi with ILI9325 – HD44780 simulation

We have a remote LCD Node that works on NodeMCU board. It has a 40×4 char LCD attached to it and displays text received via a network message. We also can use Raspberry Pi as a remote LCD. But all those LCDs are small. We need something bigger and we have it! This something is an ILI9325 graphical display. There is a huge difference between char and graphic but we can simulate char interface. Our GfxLCD library has an ability to display a text and with a little bit of tinkering, it should work :D.
This could bring nice results, imagine a dump from Symfony with multiline formatting thanks to the ProxyLCD project. Nice ๐Ÿ™‚

(more…)

GfxLCD and drawing a text

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 ๐Ÿ™‚

(more…)

Raspberry PI, GfxLCD and ILI9486

Recently I bought an LCD 4″ IPS with an ILI9486 chip from Waveshare. It should be better than 2.8″ ๐Ÿ™‚ In instruction states that this display can work as system screen and I thought that maybe we can use PyQt or something instead of a custom driver.
The idea died quickly. I tried to run it on Raspberry Pi Zero W and this is not trivial ๐Ÿ™‚ First, I hit the bug with inability to use GPIO #17 and driver couldn’t be loaded. After some googling, I know that this is caused by the newest kernel. So I reverted to old one and… screen booted up but WiFi and Bluetooth did not.
So this way is no go. Back to the original idea and custom driver for ILI9486.
(more…)

Doton the Control Node – part 1

We may now return to the main task, the Control Node with all data from all sources. We will present data in form of a tile.
I’m thinking about creating widgets for both Node One sensors.
Each node is the one tile. We could present light and movement with small icons and humidity and temperature with numbers. It sounds nice and simple but there is a catch. If we refresh the whole screen it would take around 5s to change its content. So we must find a way of repainting only required parts of the screen.

Part 2 – weather widget
Part 3 – window manager

Doton project @ GitHub
(more…)