An edge-lit frame with silicon wafers on display, using NTP time to control brightness
NodeMCU Firmware build required
octet-stream - 415.60 kB - 06/15/2016 at 22:09
Came back and revisited this project more, recently. I wasn't happy with some of the code quality and as it was my first ESP / NodeMCU Lua project some of the programming strategies were... questionable, at best. So, having learned a few things from other code I'd written for this device I chose to redo the code, utilizing the proper event systems present in the firmware and also to redesign the code to use Overlays, so that I wouldn't need to worry about one mode's memory use clobbering another's.
I also took the opportunity to remove NTP time support from the program. While a nice feature and one I did appreciate, I see no reason why I couldn't just set that up running on Home Assistant or some other automation software, and make it a smarter system than a fixed uneditable value anyways. And the extra RAM it would free up (even if it wasn't much) wouldn't hurt either. The new code is now far, far simpler and didn't need to be "minified" or even compiled, for everything to fit nicely and run without a problem. And I've nearly doubled the number of modes that the frame can run, to boot!
Overall I'm quite happy with the quality of the new code and its capabilities, and while I have one or two additions in mind (telnet support being one of them), the new code is definitely working out great.
NodeMCU is great, and it really did make this project an absolute joy to work on - having built-in MQTT, SNTP, RTC, etc code really made for a very convenient coding environment. Oh course, with convenience come caveats, and in this case the caveats include extremely limited memory space.
After spending time on programming and hitting more and more memory limits, I've noticed that you really cannot do anything complex with NodeMCU (the ESP just doesn't have enough RAM), and this application alone very nearly exhausts the available memory. I already have had to compile the bulk of the program code down to an .lc file with the debugging symbols removed, and will likely have to do so again with the modes programming should I wish to add additional capabilities to the project in future.
Flash the NodeMCU firmware available on this project page to the ESP8266.
Upload WaferFrame.lua, Modes.lua, and MQTT.lua. Adjust configuration values in files as necessary
Run the command node.compile("WaferFrame.lua")