NodeMCU and RC522 card reader

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



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


ESP8266 @ NodeMCU – lua boilerplate

This time we will look into ESP 8266 at NodeMCU v2 board. It is very small board with quite big capabilities. As a brain it has ESP-12E.
I had some opportunity to play with it at work and thought that it may be good idea to play with it some more.
My goal is to use it as event broadcaster. What events and what about broadcast you may ask :). I will hook 8 buttons to board and we will program it to broadcast event attached to button to local network.
So pressing button will send event without knowing its destination, any device can read it and do something.
Our first device that would do something is Raspberry Pi with attached LCD. So it will read event and display it. Next we will use it as controls in Piader game.
But before that we need to think and create some boilerplate. Why create and use boilerplate? So we will automate common tasks like joining WiFi, aborting booting procedure, emergency reboot and keeping WiFi alive. Simple code to do basic tasks so we may focus on our goal.
To program on NodeMCU board I will use ESPlorer as IDE and Lua as language.

Download boilerplate from GitHub