• The webapp (see below) is rocking, click on Ocean and the room turns into a wavy sub-aquatic space.
  • Different Wave requests from the webclient can add up together, like real waves.

Webapp as MQTT client

first draft functional, webapp available on github, note that you need an mqtt broker host.

Gradient color MQTT command

mosquitto_pub -t 'esp/curvy/pixels/grad' -m 

Here's where the waves magic happens (Part1 - javascript)

function sendWavesColors(col1,col2){
  var wave1 = {
    action      : "wave",
    duration_ms : 1000 * 3600 * 3 ,// 3 hours
    length      : 16,
    freq        : 0.2,
    r:col1.r, g:col1.g, b:col1.b
  var wave2 = {
    action      : "wave",
    duration_ms : 1000 * 3600 * 3 ,// 3 hours
    length      : 16,
    freq        : -0.3,
    r:col2.r, g:col2.g, b:col2.b
  setTimeout(() => client.send("esp/curvy/panel",JSON.stringify(wave1)), 500);
  setTimeout(() => client.send("esp/curvy/panel",JSON.stringify(wave2)), 1000);

The rest of the wave magic (Part2 - ESP32)

It's actually named wavelet as it's not periodic, only once bounce of light

void WS2812::add_wavelet(pixel_t color, float t, float freq, int length,float brightness);

I think the name of the function is enough, as the code is a bit cryptic, if you'd like to have fun reading it, here it is in the full file and project : https://github.com/HomeSmartMesh/esp32_iot/blob/master/rgb_led/main/WS2812.cpp 


Flexible Panel 8 x 32 WS2812B RGB leds 

  • power supply 5V 20A 100W with double outputs
  • 3d printed holders for neat cables fixing
  • double powered powered in the input (left) and in the middle, the esp32 is powerd from the end (right)
  • Panel side holder 
  • Fit in place
  • Screws mounting in the bottom
  • 3d printed case for the ESP32, as simple as possible just to avoid shortcuts