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.
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
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
Some time ago an opportunity knocked on my door. A friend needs a device that would read a card, send the id to the server and react to response.
Today we will work on code and create a class and a handler for the RC522 module.
Module and handler added to NodeMCU boilerplate @ GitHub
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
To use our beautiful ILi9325 display with ProxyLCD we need to manually edit settings.ini. This is not a good way:) Why is that? Because we cannot set a proper size. We are using a selector with predefined values. We need to change it to two text fields.
And we need the formatters, what is that you may ask? You shall see 🙂
Last time we wrote an HD44780 driver that takes GfxLCD compatible display and works with CharLCD package. This is nice because we can use big ILI9486 as a character display.
You may ask, why?
Because with ProxyLCD we can see a big output from Symfony 🙂 And because we can 🙂
Today we will focus on two bugs from a previous part and we will see if all chipsets can work with HD44780 driver.
– Part 1
We have a remote LCD Node that works on NodeMCU board. It has a 40×4 char LCD attached to it and displays text received via a network message. We also can use Raspberry Pi as a remote LCD. But all those LCDs are small. We need something bigger and we have it! This something is an ILI9325 graphical display. There is a huge difference between char and graphic but we can simulate char interface. Our GfxLCD library has an ability to display a text and with a little bit of tinkering, it should work :D.
This could bring nice results, imagine a dump from Symfony with multiline formatting thanks to the ProxyLCD project. Nice 🙂
I need to focus on my additional project in PHP. That means Doton and GfxLCD lib must wait but we will use this time to upgrade ProxyLCD project.
What is ProxyLCD? It is remote LCD that works on NodeMCU, stand alone desktop app in Python and Symfony’s bundle.
Bundle listens to dump() command and when a dump is called it parse object or array to a string, connects to an app and sends it. App gets this content and sends it to added remote LCDs.
Read more about ProxyLCD on the right column:)
Finally, something that is missing from the start, the ability to write some text on display. In Doton we needed an ability to display numbers and we have done it via images. It was a partial solution but good enough. But we want more 🙂
So this time fonts, text and another step in endless struggle with displaying anything anywhere 🙂