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!
We can display only 6 tiles on the screen. It is not too much. But when we redesigned GUI we prepared touch spots to scroll between pages.
A page is a group of maximum 6 tiles so one page fits on the screen. And with a few pages, we can have much more information available.
I’m little afraid of inaccuracy of touch panel. Why? See that scroll down area overlaps our two widget buttons. We may be forced to move them up to the middle row. But we will see 🙂
We have a touch driver in our GfxLCD package so we can upgrade Doton a little. We will add clickable widgets.
Our window managers will handle touch propagation. For the first widget with action, we will create a light switcher.
Source @ GitHub
At least, I mentioned touch so many times. Today we will create a new driver and add it to GfxLCD library.
GfxLCD @ GitHub
This time we will finish what we started, the weather widget for Doton project:)
We still have the weather widget to finish. But before that, I’m thinking about big changes in tile layout. Why?
Because tiles are rectangles and they cannot be used in vertical mode, square tiles would be much better.
This should give us a free space on top and bottom of the display for a nice functionality in near future (do not forget that out TFT is a touch screen) 🙂
Let’s get to work!
Source @ GitHub
Long, long time ago in a post far, far away we made a weather worker (part 1, part 2). It is time to find it and add to our project along with new widget.
And as a side effect, we will sugarcoat GUI a little bit.
Doton part 1
Doton part 3
Source code @ GitHub
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
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:)
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.
pip install gfxlcd
GfxLCD on PyPi
Old code, before module extraction, is under tag before-split. This way old posts still have some sense:)