Uncategorized

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

Advertisements

Get Noticed! / Daj Siฤ™ Poznaฤ‡

This is a contest about blog and what is more important about an open source project. My friend told me to join so I will try and do my best:)
What scares me is requirement of two post per week. So called daily live takes lots of time and additionally sometimes reading technical info and putting it into code takes a lot of time ๐Ÿ™‚
But it is gonna be fun ๐Ÿ™‚
See more about contest here (pl): http://devstyle.pl/daj-sie-poznac

What will we do? – A Doton project
Main goal is to create a control node on Raspberry Pi with touch screen. Screen is a small TFT 2.4″, ideal would be finding Pi Zero in good price and use it (they are overpriced in my country).
So we need a window manager to display controls and lots of workers. What is worker? It is a node that do something like relay to control light, inet weather grabber, temperature sensor and so. I’m thinking about LCARS based GUI but I’m not sure if it will fit on small screen.
But this is main goal. Steps to it consist of: TFT and CharLCD, ProxyLCD and TFT, RPi and relay, Symfony and monolog, GfxLCD and TFT + Graphical LCD. Maybe even NodeMCU and TFT. Proximity sensor, movement detection, light sensor and who knows what else.

GitHub repository

Little tweaks in ProxyLCD

I found one annoying issue – when sending only number it crashes.

Crash was easy to fix but unexpected. While converting int to json, Python just convert it to number. I’m not sure if this is a bug or not. But I added additional check.

Lets make an app a little more talkative. When started it prints some useful info:

Config loaded. Starting app
TCP port:  5054
Broadcast IP:  192.168.1.255
Broadcast port:  5053
LCDs:
Name       | Node name  | Size    | Stream | Type
Debug      | node-40x4  | 40,4    | +      | charlcd
Info       | rpi1       | 20,4    | +      | charlcd
damaged    | node-2     | 16,2    | -      | charlcd

640K is enough, maybe but I have 44KiB :)

Today I hit a wall, infamous:

PANIC: unprotected error in call to Lua API (not enough memory)

I just wanted to hook two LCDs and it was overkill. This woke me up. NodeMCU / ESP8266 is not a multi-purpose node. It is good at doing its simple jobs and not doing all at once.
With this I’m gonna slightly change next steps. After next project I think I’m gonna consider moving to C. I really like fast development with LUA and I think it is good choice for small things but C is the King.

Back to fun :)

Long break is over. Much happened, but now is now. So whats next ? Back to code refactor, put basic things together and stop at the stable version.

Next play with Windows 10 IoT on Rpi2, and do some universal app. Add endpoint to our Python app and join it with Windows Phone. It would be nice to have an control panel.

I’m starting PyCharm and back to fun ๐Ÿ™‚