ESP 8266

Multi Relay Node

For a long time, I got one printer togglable by the RelayNode. Everything was working ok except when I moved the printer to another place I had to remove all additional circuits. When I got it back, I knew I needed something easier to use. And that’s when a MultiRelayNode idea appears. (I love those names :D)

What was RelayNode? It was a simple circuit with a dual relay controlled by ESP8266. I could toggle the printer and the light remotely or via buttons.

Now I want to connect the second printer and its light.

GitHub: lua code

STLs: case , buttons

(more…)

NodeOne – version 2

With the arrival of Google Assistant in my country, I felt the urge to hook NodeOne to it. But I also felt that NodeOne needs refreshing.
The first version was made almost two years ago. It has PIR sensor mounted or rubber, a board that holds inside magically and a light sensor that is kept in place by a tack. But it is still working without any problems!

GitHub

Small upgrade to relay
(more…)

NodeMCU and a tricolour led

I’m on a project that requires some feedback after the operation is made. I cannot use an LCD because they are only two pins left and almost no memory. So my mind focused on two LEDs but after a while, I made a choice, I will use tricolourย LED.
From what I read there are two types, one with a common anode and one with common cathode. We will go with common anode.

Module added to boilerplate

(more…)

NodeMCU LCD connected to CharLCD package – part 2: something useful

Last part was strange, we wrote a direct driver that has no real usage. We done it only because we kept compatibility. This time we will do something more useful, WiFi content driver. We will try and do in such way that only content is send. This is more friendly for network and sanity ๐Ÿ˜›

(more…)

NodeMCU LCD connected to CharLCD package – part 1: a whaaat ?

This time my two projects, CharLCD and NodeMCU boilerplate join forces in endless effort to display something somewhere ๐Ÿ™‚

What does it mean? It means that we will add another driver to CharLCD. This will allow us to use remote LCD with Raspberry Pi and later with any application in Python. It should be possible to use it with LCD Manager package and this is something very interesting ๐Ÿ™‚

As a remote LCD we will use HD44780 (40×4) hooked to NodeMCU via i2c (but we know that we can plug any LCD via gpio or i2c ๐Ÿ˜› ) and it will listen to broadcast messages.

Rpi (with CharLCD and driver) will broadcast UDP messages into network.

Lets get started.

(more…)

NodeMCU and HD44780 โ€“ part 4: drivers, i2c and double E

Time to take another step with NodeMCU and HD44780. This time we will separate driver logic from lcd logic. Why? Because it is much more flexible for our lcd (direct and bffered) to have general write, set_xy and move wiring specific logic to driver. This way we can just swap gpio with i2c without any problems.
This imply that we will also write i2c driver ๐Ÿ™‚
Another matter is hooking screens with size 40×4. In fact they are two smaller lcds, 40×2, with shared all signals except E1 and E2. How it works? You set required signals and select top screen with E1 or bottom with E2.
Lets get to work.
Code is available in boilerplate
(more…)

NodeMCU and light detector – part 3: PyQt5 to the rescue

Our previous computer app was a failure. Happens from time to time:) Choosing wxPython was a huge mistake. Seems wx bindings are outdated.
After a long walk to cool of my head and think a little (but mostly catching pokemons) I recovered my strength and began second approach. This time I’m using PyQt5. It has Python3 bindings and lots of nice features, like ability to emit signals to other objects.

Spoiler: this time a full success ๐Ÿ™‚

Get source from GitHub

(more…)

NodeMCU and light detector – part 2: failing is an option

We need something to see the state. I think the best way is to display icon in the taskbar. It must work under Windows 10 and Ubuntu/Mint.
To build GUI I will try and use wxPython. Sadly their bindings are for Python 2.7 not 3.x. I found wxPython Phoenix Project but for now lets stick with official release.
Spolier: we gonna fail – see running section. This is why code is dirty and nasty – no reason for refactor.
(more…)

NodeMCU and light detector – part 1

We have a small problem at the office. This problem is only one toilet. Additionally not all rooms can see it and know if it is busy or not. So quite often someone runs and slams into closed door.
Such runner has two options, form or join queue and wait or go back to desk and return later.
It would be much better for all of us if we could check toilet status from our desks.
How to do it? Simplest way is to detect if light is enabled. Hopefully this would be enough. If not I have another idea ๐Ÿ™‚
As light detector I’m going to use lm393 light sensor and as the brain NodeMCU v3.

Download code
(more…)