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.
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.
Today we combine the power of HLK-PM01, PIR HC SR-501, DHT11 and a light detector.
Together they create a nice looking multipurpose Node One. I wanted to do it for some time but the last piece was missing. I didn’t have an idea how to create a box for components.
Few days ago I found a perfect case named Z27. It has all I wanted, socket, plug and enough space for NodeMCU v3.
Python code @ GitHub
LUA code @ GitHub (more…)
We have a nice node that detects light, it works in toilet @ my work 🙂 It does it jobs almost perfectly. There is still a hack for it – leave a light on when leaving the toilet. I have an idea to fix this but first, let’s reforge a lousy code into a module and a handler. After refactor we may safely add it to the NodeMCU boilerplate.
This is going to be our second data node for display. It will show area lightness and with conjunction with a time, we can tell if an artificial light is on or off.
We have LCDs and we should have a data that can be displayed on them, we need data sources. So in parallel with displaying, let’s work on some sensor nodes.
First will be a motion detector, we gonna use a module with easy to remember name: PIR HC-SR501 🙂.
There are a few variants of it. But the main difference is an ability to use jumpers to change mode. My version can’t do that 😦
As a brain for sensor we will use the NodeMCUv3 board and as a language the LUA.
Our little devices require a power. Mostly 5V DC. How to deliver it? The power grid is 230V so it is too much 🙂 and additionally, it is AC.
What can we do?
We can use a phone charger. It is easily affordable and does its job. But it looks bad and often we have power so close that it is a waste to use something with a long cord. We want to have a nice, small and compact device. What can we do?