Html code to control a DC motor

Hello Group!

I'm looking for some html code to control a dc motor for direction and speed. I've found several servo examples using buttons and sliders. The code uses the servo.h library and does not work with regular dc motors. Has anyone ever attempted this? Thanks for the help.

I'm not quite sure what you're asking. HTML is just a markup language. Are you making an embedded web server that sends HTML code to a web browser, and you then send back data from the browser to control the motor?

@miker00lz: Yes i already know how to make the html code which I am using an Arduino Uno WiFi Rev2, it's setting up the html code to control the motor. I am using a slider. I know how to use a button to turn motor on and off. I would like to control the motor gradually. Thanks for the help

Ok, so you're trying to figure out how to implement the web server? I just happened to write one for the Arduino this week. It's a very simple one.

My project is an FM radio tuner that can stream the audio over TCP, but there's also a simple web interface that's used for tuning it to a different station and see various stats.

You might want to have a look, you can see how I do it. You should be able to modify the web server section for what you need pretty easily. I'm attaching it here.

It written for either an ESP32 wifi interface or a wired connection through a W5x00 Ethernet module. I don't have the Arduino wifi, sorry but I imagine it's not hard to modify for that.

radio.zip (3.48 KB)