A small collection of NodeMCU Lua scripts


Limpkin writes:

I usually never use libraries… but made an exception for these quick projects !
I’m pretty sure that most people reading this very article know about the (very) cheap ESP8266 Wifi module.
A bit more than a year ago, I actually made a small development board for it, which was recently used in the connected lamp that wakes me up. While what follows pales in comparison to what cnlohr has implemented on this chip over the last months, sometimes you just have small projects that you don’t want to spent days on.
Anyway, the ‘standard’ way of compiling programs for this neat little chip involves installing a cross-compiling toolchain on a Linux computer (or VM), and then using a dedicated tool to flash your program to the ESP8266.
As you can guess, this can quickly get tiring if all you want to do is blink an LED… but then I stumbled upon NodeMCU and Domoticz.

Full details at Limpkin’s blog.

Join the Conversation

1 Comment

  1. Nice, I wonder how big are the really large NodeMCU Lua scripts given the available Flash and RAM. Hmmm… most long-time Lua users don’t use 8 spaces for indenting. Also, NodeMCU users should get into the habit of using more local variables.

    Lua is not the perfect language for embedded hardware, but it is small and can fit into the SoC, so it’s fine, we embedded fellas have used messier stuff in the past, this is paradise in comparison. Lua is also small in that you can fit it into your brain easily, a welcome breeze compared to languages massive in scope and libraries. If you are a gamer, you’d probably have been using Lua all your life — plenty of games from casual to AAA titles use it for game logic.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.