Comments on: ESP32 Web Server (WebSocket) with Multiple Sliders: Control LEDs Brightness (PWM) https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Fri, 30 May 2025 09:33:44 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: John Oomen https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1052316 Fri, 30 May 2025 09:33:44 +0000 https://randomnerdtutorials.com/?p=103781#comment-1052316 In reply to Marius.

Many thanks / dank je wel

Haha we zijn notabene beide Nederlanders. Small world.

]]>
By: Marius https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1052145 Thu, 29 May 2025 14:01:48 +0000 https://randomnerdtutorials.com/?p=103781#comment-1052145 In reply to John Oomen.

I have placed the files, accompanied by some explanation, on a separate website, emhave.nl/ESP32%20LILYGO%20T-Relay%20Multiple%20Sliders/ESP32%20LILYGO%20T-Relay%20Multiple%20Sliders.html
Regards,
Marius

]]>
By: John Oomen https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1046440 Thu, 22 May 2025 08:53:54 +0000 https://randomnerdtutorials.com/?p=103781#comment-1046440 In reply to Marius.

Wow nice Marius, i only see much later your message is from 2022
Much appreciated man.

If you could send it to ; icewolff@yahoo.com

]]>
By: Marius https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1046285 Wed, 21 May 2025 19:40:01 +0000 https://randomnerdtutorials.com/?p=103781#comment-1046285 In reply to John Oomen.

Hello John,
The main difference is in script.js:
function updateSliderPWM(element) {
var sliderNumber = 100 * element.id.charAt(element.id.length-3)
+ 10 * element.id.charAt(element.id.length-2)
+ 1 * element.id.charAt(element.id.length-1);
var sliderValue = document.getElementById(element.id).value;
document.getElementById(“sliderValue”+sliderNumber).innerHTML = sliderValue;
console.log(sliderValue);
websocket.send(sliderNumber+”s”+sliderValue.toString());
}
and:
function onMessage(event) {
console.log(event.data);
var myObj = JSON.parse(event.data);
var keys = Object.keys(myObj);
console.log(keys);
for (var i = 0; i < keys.length; i++){
var key = keys[i];
console.log(key);
document.getElementById(key).innerHTML = myObj[key];
console.log(myObj[key]);
document.getElementById(“slider”+ (i+501).toString()).value = myObj[key];
}
}
The slidernumbers must be in the range 501, 502, … and so on.

I can’t copy the full files in this response. If you send your mailaddress I will mail the files.
Greetings

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1046218 Wed, 21 May 2025 10:23:49 +0000 https://randomnerdtutorials.com/?p=103781#comment-1046218 In reply to John Oomen.

Hi.
You need to use pioarduino that supports the latest version: https://randomnerdtutorials.com/vs-code-pioarduino-ide-esp32/
Regards,
Sara

]]>
By: John Oomen https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1046096 Tue, 20 May 2025 20:40:11 +0000 https://randomnerdtutorials.com/?p=103781#comment-1046096 hi Sara,

I have a problem with visual studio/platformIO, because v3 do not support anymore “ledcAttachChannel”

https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#id2

// Set up LEDC pins
ledcAttachChannel(ledPin1, freq, resolution, ledChannel1);
ledcAttachChannel(ledPin2, freq, resolution, ledChannel2);
ledcAttachChannel(ledPin3, freq, resolution, ledChannel3);

copiplot whant to change to ::

ledcSetup(ledChannel1, freq, resolution);
ledcAttachPin(ledPin1, ledChannel1);

ledcSetup(ledChannel2, freq, resolution);
ledcAttachPin(ledPin2, ledChannel2);

ledcSetup(ledChannel3, freq, resolution);
ledcAttachPin(ledPin3, ledChannel3);

What and where do i have to change more in the code to make it work again ??

]]>
By: John Oomen https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1046048 Tue, 20 May 2025 15:12:00 +0000 https://randomnerdtutorials.com/?p=103781#comment-1046048 In reply to Marius.

Hi Marius, could you share/send me the files plz
Really interrested in more sliders and buttons to add to this project,

finest regards john oomen

]]>
By: john https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1042868 Mon, 12 May 2025 13:05:57 +0000 https://randomnerdtutorials.com/?p=103781#comment-1042868 In reply to Sara Santos.

Thank you Sara. Great site and fast support , i like it.

Gone try to combine some of your tutorials

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1042844 Mon, 12 May 2025 10:58:48 +0000 https://randomnerdtutorials.com/?p=103781#comment-1042844 In reply to John Oomen.

Hi.
With this kind of setup, you would need to use ESP-NOW to send commands to other boards to control them.
All our ESP-NOW tutorials can be found here: https://randomnerdtutorials.com/?s=esp-now

Regards,
Sara

]]>
By: John Oomen https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/#comment-1042676 Sun, 11 May 2025 20:16:16 +0000 https://randomnerdtutorials.com/?p=103781#comment-1042676 Loving it, great tutorial, works great.

Is it possible to controll more than 1 ESP32 on the website with sliders ( so there more sliders) first 3 sliders control esp1, then the next 3 sliders control esp2, next 3 sliders control esp3 outputs ?

Best regards John.

]]>