/luxsrv

Listens for network packets controlling RGB LED strips on NodeMCU ESP8266

Primary LanguageLuaApache License 2.0Apache-2.0

luxsrv

❤️💚💙

luxsrv is a Lua program for the NodeMCU ESP8266 devkit that listens for network packets describing the color setup and driving the WS2812B LED strip.

luxsrv is part of Lux.

NodeMCU

Refer to these resources for more details:

Firmware

The NodeMCU ESP8266 devkit must have the NodeMCU firmware flashed on it. Refer to the following resources for instructions how to flash it:

Development

Requirements

Installing

Run npm install to install the dependencies.

Configuration

Wi-Fi Configuration

Wi-Fi credentials must reside in src/wifi_config.lua following this format:

return {
    WIFI_SSID = "My Home Network",
    WIFI_PSK = "MySuperSecretPassword"
}

LED Pixel Count

Set the number of pixels on your LED strip in src/lux_server.lua, e.g.:

local LED_COUNT = 120
local PORT = 42170

Uploading the Scripts

  • Connect the ESP8266 to your PC via its microUSB port.
  • To list what's on the device, run npm run ls
  • To format the device, run npm run format
  • Compile and upload with npm run upload