Month: April 2017

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…)

Advertisements

Raspberry Pi and package for graphical LCDs – GfxLCD

It took some time but finally, we can exclude GfxLCD package from The Doton project. After this, we may focus on the next stage of Doton project.

But back to now:) We need to create a new package and publish it on the PyPi.
Installation:

pip install gfxlcd

GfxLCD on PyPi
Old code, before module extraction, is under tag before-split. This way old posts still have some sense:)

(more…)

Raspberry Pi and area drawing on ILI9325

In previous three articles, we managed to create a united interface for NJU and SSD based LCD. Today we will add another LCD, the most important one, with ILI9325 chip and 240×320 size.
This one brings a new way of drawing. Not on pages but on pixels and with colours.
Page drawing:
part one
part two
part three

Source @ GitHub
(more…)

Raspberry Pi and drawing with 8 bit page – part one

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

(more…)

Raspberry Pi, Python and OLED display

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.

GitHub

(more…)