What I need is ability to read content of LCDs via network. With our manager it should be easy. We will add such service to Display class. It will start server and react according to request. For now I think about two commands, one for getting list of all managers and second for getting a content from needed.
Our LCD Manager would be better with display server, something that will take care of rendering at constant FPS. If you look at Piader v2 you see that there is a main_loop function. In it we refresh lcd content at some fps but it is quite annoying because it shouldn’t be our problem. Manager should take care of it.
Our task for now: add display server.
Now you can install LCD Manger from PyPi repo:
pip install LCDManager
There is last step do to with Char LCD. It is to publish it on PyPi. From now you can easy install package by:
pip install CharLCD
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.
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.
We have all bricks to build a game view. It is the most important view in game 🙂
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.