Please dont use this. I really didn't know what i was doing, didnt test it and abandonded it.
This project aims to create an easily expandable interface for controlling a ws2812 LED strip. Each device is uniquely identified by a combination of its IP-Address and a numeric ID to allow for multiple devices across different networks to still be distinguishable.
I actually wrote an early version of this in the first Lockdown, but my lack of knowledge about Lua and electronics brought this project to a quick end. I broke my LED strip and abandoned the project. 2 weeks ago while cleaning up my desk i stumbled across the NodeMCU and since I had already bought all the other necessary parts I thought: "Ok finish what you started. But this time inform yourself and do some research beforehand."
To use this project you'll need:
- A NodeMCU Dev Kit(generally just referred to as NodeMCU but NodeMCU is not the actual name its just the firmware)
- 1 ws2812-like led strip(WS2812, WS2812b, APA104, SK6812)
- A Power Supply capable of powering your strip(depends on length and led count)
- A Relay(For having everything turn on/off remotely)
- (Also some way to power the NodeMCU, e.g. a Micro-USB Cable)
- Connect your strip's power wires to the PSU, one of them intercepted by the relay.
- Connect the relays power to the NodeMCU(GND, VCC for 5V or 3V3 for 3.3V)
- Connect the power-pin assigned in the config to the relay's input(default: 5)
- Connect the LED's data wire to Pin D4
- Connect the Power Supply and the NodeMCU to mains voltage(or whatever)
- First you need to flash the firmware onto your NodeMCU.
- Now clone this repo and have a look at config.lua(Insert your Wifi credentials and configure it to suit your needs)
- Upload everything then restart the device(How?)
Required Modules: node, net, file, gpio, ws2812, bit, tmr, wifi
Optional Modules: http, mdns
Where to build?
You can either use NodeMCU Cloud build service, my attached firmware, or build yourself.
How to flash?
On Windows you can flash using NodeMCU pyflasher.
On Linux you will have to use esptool which is terminal only
Anything capable of uploading stuff to a ESP8266 could do this but I recommend Andi Dittrich's NodeMCU-Tool. Upload each .lua file and then restart your NodeMCU by typing nodemcu-tool terminal
and then node.restart()
. You should see a lot of unreadable mess in your terminal and then some information about the firmware build. The LED on your board should start blinking, indicating that a Wifi Connection is being established. If the LED stops blinking the connection was made, if not you should check your Wifi Credentials once again.