CharLCD

Raspberry Pi as a Node

We have the remote nodes that work with NodeMCU board with message handler. But I found out that I forgot to implement such mechanics for RPi 🙂 I’m talking about handlers and listeners. On NodeMCU we start a server that listens to broadcasts on port 5053 and passes the message to registered handlers.

This time we will create a Python server and we will write our first handler to support char LCDs. It will react to the same messages as NodeMCU’s one. This will allow us to use ProxyLCD with it and it is a first step to support TFT LCD.

Code on GitHub
Installation from PyPi:

pip3 install message_listener

And handler incorporated into CharLCD. It is also available as submodule in Doton project
(more…)

Advertisements

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

Making CharLCD compatible with Python3

We have working LCD and LCD Manager library. They works on Python 2.7 but not v3. I thought about making them v3 compatible but before that I had to upgrade my system. And this was bad idea 🙂

Problem with SD card and free space forced me to change system drive to USB. And then everything went from bad to worse 🙂 But after 5 hours system was back to being ok.

As first we need to port CharLCD. After reading https://docs.python.org/3/howto/pyporting.html I started porting.

(more…)

Piader v2 – scoreboard

We have a nice game and we may play it. But there is one problem we don’t see number of lives and our score. In this article we will create another view and position it on second display. I played with 40×4 for game and 20×4 for score but ended with one lcd with two vlcds 🙂

We will also do something with difficulty as we have such setting it would be nice that it would do something

And of course we can’t forget about bugs, we will fix few along the way.

(more…)

LCD Manager – part 8: widget canvas

Thinking about Piader game view brought me to conclusion that we need a canvas widget. The widget on which we can draw any char at any place. Something similar to pure lcd usage. We will be able to set cursor at any position in canvas and put char. Internal pointer will allow us to stream chars one after another.

(more…)