-->
Page 1 of 2

Controlling WS2812 from a webinterface

PostPosted: Sat Feb 20, 2016 11:31 am
by naphil
Hello guys,

I need some help for my project from some people who are more experienced than I am. I'm completly new to the esp8266, but have worked a bit arduino. Recently I made a C# programm with an gui (with color picker etc.) that sends commands to an arduino nano over serial to control WS2812 leds, also known as neopixels.
I thought why not take a step further and create something that lets you control the leds from anywhere in local network.

What I wanna do is to create a webpage that gives the user the ability to control the leds (change color, brightness, select from pre-programmed animations like rainbow, breathing/fading colors). It would be nice if I could use something like bootstrap to make the page nice looking and responsive and therefore more user-friendly on mobile devices, but don't know if it is possible, because I wanted the interface hosted completly on the esp.
I ordered some different esp8266 modules (nodeMCU dev board v2; a bare ESP-12E and ESP-01 chip) a day ago and will take a while until they arrive here from china, so I actually haven't tinkered with it at all.

Could you point me to some things I should read up on to tackle this project? I think websockets could be useful for this.
With the arduino I used the FastLED lib to interface the leds and I know that it has esp support, has anyone used it for something similar?
Also I'm unsure if it is possible with the esp alone because I need to process user input and refresh the leds for animations at the same time and I heard that the one-wire-chipsets have some pretty strict timing requirements.
How do I serve a website created with bootstrap from the esp?

Thanks for your help :)

Re: Controlling WS2812 from a webinterface

PostPosted: Sun Feb 21, 2016 6:32 am
by lethe
You may want to checkout this project: https://github.com/cnlohr/esp8266ws2812i2s
It already has a built-in webserver that can serve arbitrary files and is using DMA to control the LEDs (so no flicker during wifi traffic).

Re: Controlling WS2812 from a webinterface

PostPosted: Sun Feb 21, 2016 2:47 pm
by bbx10node
This thread lists a few more ws281x projects.

viewtopic.php?f=6&t=6773

Re: Controlling WS2812 from a webinterface

PostPosted: Mon Feb 22, 2016 10:02 am
by naphil
Thank you both. I will have a look at those links.
Really hope my stuff arrives soon, so I can start trying things out.
What SD card modules can you use with what esp versions? I saw you could use it with a ESP-01 if manually break the rquired pins out. With the ESP-12E or NodeMCU v2 this shouldn't be required right? What SD card module is recommended for use with the esp8266 if it does matter at all? Are the ones you can't use with it?