Skip to main content
Topic: WiFi LED Light (ESP8266 + WS2812B + Lua) (Read 35792 times) previous topic - next topic

WiFi LED Light (ESP8266 + WS2812B + Lua)

[attachment=4]
Hi,

I built a prototype for a WiFi controllable LED light, using the popular ESP8266 module running the NodeMCU firmware [1]. To allow controlling the WS2812B LEDs from Lua, I extended the firmware with a bit of C code [2].

The YouTube video shows it in action: http://youtu.be/oTnsXuxRcE8

Please find all necessary files attached.  Note that the pre-built firmware uses 115200 as the default baud rate.

Have fun,
Markus

[1] https://github.com/nodemcu/nodemcu-firmware
[2] http://www.esp8266.com/viewtopic.php?f=21&t=1143

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #1
Nice work as always Markus

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #2
Thx :)

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #3
Hi Markus,
first I must congratulate you for this idea. I've looked at the circuit and would like to recreate this. I just wonder with which the PIN WS2812B from the ESP-01 is controlled?

Hallo Markus,
erstmal muss ich dich beglückwünschen für diese Idee. Ich habe mir die Schaltung angeschaut und würde diese gerne nachbauen. Ich frage mich nur mit welchem PIN der WS2812B vom  ESP-01 angesteuert wird?

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #4
On the ESP-01 you can use either GPIO0 or GPIO2.  On ESP modules with more GPIO pins broken out also the other pins.  You specify the pin which should be used as first argument of the function-call which sets the LED colors.

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #5
Hi,
I am a beginner, can you tell me what this text means. Which file to be opened

NodeMCU 0.9.5 build 20150127  powered by Lua 5.1.4
192.168.4.1   255.255.255.0   192.168.4.1
> open
PANIC: unprotected error in call to Lua API (server.lua:21: open a file first)

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 31712, room 16
tail 0
chksum 0x0a
load 0x3ffe8000, len 2872, room 8
tail 0
chksum 0x06
load 0x3ffe8b40, len 13644, room 8
tail 4
chksum 0x1a
csum 0x1a
r?

NodeMCU 0.9.5 build 20150127  powered by Lua 5.1.4
192.168.4.1   255.255.255.0   192.168.4.1
>

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #6
Do you have uploaded the file index.html?

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #7
Many Thanks!
I did not know that this file must be uploaded. Now everything works. Super program.
Thanks again.
hats off

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #8
Hi Markus,

super manual. I have the server.lua and the index.html copied to the ESP8266 with the esplorer. Then I start the new ESP. Now, a new AP appears to me wifi 192.168.4.1 is the name. I connect with this and then try the address 192.168.4.1 to call. However, it is then the page is not available. What am I doing wrong? Did it several times on the ESP copied result remains the same.

Hallo Markus,

super Anleitung. Ich habe die server.lua und die index.html auf den ESP8266 mit dem esplorer kopiert. Danach starte ich den ESP neu. Nun wird mir auch ein neuer AP angezeigt wifi 192.168.4.1 heißt der. Ich verbinde mich mit diesem und versuche dann die Adresse 192.168.4.1 auf zu rufen. Es kommt jedoch dann die Seite ist nicht verfügbar. Was mache ich falsch? Habe es schon mehrfach auf den ESP kopiert Ergebnis bleibt aber das selbe.

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #9
im probably a noob but the 2 bin files how do i flash them using esp flasher or upload them via esptool ?

Re: WiFi LED Light (ESP8266 + WS2812B + Lua)

Reply #10
[quote author="Wroddi1402"]Many Thanks!
I did not know that this file must be uploaded. Now everything works https://skinnyexpress.com/phen375-review-and-results thanks to Phen375. Super program.
Thanks again.
hats off[/quote]

Holy cow that's awesome Markus. I've been wanting to make something like this as a lamp for a while now. Think I'll give it a go now. Thanks.