GfxLCD and ILI9325 C driver – part 2

This time we will work with drawing functions. Displaying pixel is easy but next, we have a line, circle and arc. I wonder how hard or easy moving functions from Python to C gonna be.

In Python implementation of GfxLCD, we use @property to access width, height or set colours. We need to do same with C implementation. I see two ways, one we will use Python class that would translate property to function call in C or maybe we can use some ability of Python-C wrapper.

GfxLCD and ILI9325 C driver – part 1

(more…)

Advertisements

ILI9325 in Python and C – performance

I have some crazy idea but before we need to do something with GfxLCD performance. Using ILI9325 with Python is a way to slow:

pi@raspberrypi2b:~/workspace/gfxlcd/gfxlcd/demos $ time python3 ili9325.py
real    0m14.528s
user    0m14.080s
sys     0m0.070s

Filling screen with size 240×320 in 14s is not impressive. Let’s see what happens when we move a layer down to C.

(more…)

Doton – cleanup

Some time ago my RPi with running Doton crashed. It was quite a surprise but happens:) Reason was trivial, I moved it and SD card was pressed against the wall and ejected 🙂 But after a restart, it crashed again but this time with a fatal error. This hits me! We have no way of showing a temperature that is under zero!
This also remembered me that I didn’t do anything with the project for some time. I still have a window manager to redesign and rewrite.
But let’s start low and first clean up a GIT repository by removing submodules and changing a readme.

This project started its life with Daj się poznać competition but competition is over. Time to clean it up from additional modules and leave only files that are used.
The fastest method was to manually delete .gitsubmodule and directories 🙂

(more…)

RC522 reader and configuration – anything is good

I mentioned a magical switch to enable configuration mode. In this post, we will write a configuration module for RFID node. Why not for boilerplate?
Because first, we will analyse the problem and create a tailored solution. After gaining some experience we will rewrite module and create a universal configurator.
What is to configure? An AP credentials and an URL for a server.
(more…)

NodeMCU RC522 and an electronic case

There are a hardware and a software but this is not all, there is also a case that holds all together 😀 and makes project look good 🙂
The Client wants a nice looking case and this is easy to understand. So new area for me, how to make nice holes for connectors, LEDs, switches and so, last time (with NodeONE) it wasn’t all good.
But today there is no room for failure! Let’s get to work!

  • part 1: NODEMCU AND RC522 CARD READER
  • part 2: NODEMCU AND RC522 AND REST COMMUNICATION

(more…)

NodeMCU and RC522 and REST communication

Last time we made a device that reads RFID card and communicates with devices by broadcasting a message. This implies that on the same network a server must be. We can use another device to work as a proxy between reader and remote server but why? We can communicate directly with the server via HTTP requests and box can inform other devices about the result.

Code added to  NodeMCU Boilerplat@GitHub
(more…)