DIYables Web Apps Web Rotator

Overview

This ESP32 S3 Uno web rotator tutorial shows you how to control the angle of a servo or stepper motor from a round disc in your web browser. The ESP32 S3 Uno form board serves the disc page over WiFi, and every turn of the disc sends a new angle to your sketch in real time. It is a simple way to build web servo control for robot arms, camera mounts or antennas.

In this tutorial, you will:

  1. Install the DIYables ESP32 WebApps library in Arduino IDE
  2. Open an interactive rotator disc in the browser of your phone or PC
  3. Choose between continuous rotation and a limited angle range
  4. Move a servo motor on the ESP32 S3 Uno with the web disc
  5. Adapt the code for a stepper motor or several axes
ESP32 S3 Uno web rotator

This video shows the Web Rotator app moving a servo motor step by step:

Features

The WebRotator app turns your browser into a rotary control knob. The library builds the whole page for you, so you only write the code that reacts to the angle.

Interactive rotatable disc

You turn the disc with the mouse on a computer or with your finger on a phone or tablet. A marker on the disc shows the current position.

Two operation modes

Continuous mode lets the angle go from 0° up past 360° with no limit. Limited mode keeps the angle between a minimum and a maximum that you choose.

Real-time angle feedback

The page shows the current angle in degrees. Data travels over WebSocket, so the ESP32 S3 Uno gets each new angle at once, without a page reload.

Easy setup

You set the mode and the angle range once, in the constructor. The page adapts its display to your settings by itself.

Clean design

The disc uses a conic gradient and turns smoothly. The layout works on small and large screens.

Hardware Preparation

1×ESP32 S3 Uno-form Board
1×USB Cable Type-A to Type-C (for USB-A PC)
1×USB Cable Type-C to Type-C (for USB-C PC)
1×Servo Motor (optional for testing)
1×Breadboard
1×Jumper Wires

Or you can buy the following kits:

1×DIYables Sensor Kit (18 sensors/displays)
Disclosure: Some of the links provided in this section are Amazon affiliate links. We may receive a commission for any purchases made through these links at no additional cost to you.
Additionally, some of these links are for products from our own brand, DIYables .

Buy Note: For controlling multiple servo motors, use the PCA9685 16 Channel PWM Servo Driver Module to save MCU pins and simplify wiring.

Setup Instructions

Detailed Instructions

The first four steps prepare the board. The rest install the library and run the basic WebRotator example, which only prints the angle. You can add a servo later.

  1. New to the ESP32 S3 Uno? Follow ESP32 S3 Uno - Getting Started first.
  2. Wire it up: for this first test, no wiring is needed. If you want to move a servo, see the wiring diagram further down.
  3. Connect the board to your computer with a USB Type-C cable.
  4. Open Arduino IDE, choose the ESP32S3 Dev Module board and the correct COM port.
  5. Open the Library Manager by clicking the Libraries icon on the left bar of Arduino IDE.
  6. Search the library: type "DIYables ESP32 WebApps" and find the DIYables ESP32 WebApps Library by DIYables.
  7. Install it: click the Install button.
  • Search for DIYables ESP32 WebApps created by DIYables and click the Install button.
∞
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
ESP32S3 Dev Module
Library Manager
Type:
All
Topic:
All
DIYables ESP32 WebApps by DIYables
A comprehensive library designed for ESP32 that provides multiple professional web applications including Web Monitor, Chat, Digital Pin Control, Sliders, Joystick, Analog Gauge, Rotator Control, and Temperature Display via WebSocket communication. Features modular architecture for memory efficiency, automatic config handling, and perfect for IoT projects, robotics, sensor monitoring, servo/stepper control, temperature monitoring, and remote ESP32 control. More info
1.0.1
INSTALL
Newbiely.ino
···
1 void setup() {
Output
Serial Monitor
Ln 1, Col 1
ESP32S3 Dev Module on COM15
1
  1. Install the dependencies: Arduino IDE asks to install some other libraries. Click Install All.
  2. Open the example: go to File Examples DIYables ESP32 WebApps WebRotator, or copy the code below into Arduino IDE.
/* * DIYables WebApp Library - Web Rotator Example * * This example demonstrates the Web Rotator application: * - Interactive rotatable disc control * - Two modes: Continuous rotation and Limited angle range * - Real-time angle feedback with WebSocket communication * - Touch and mouse support for desktop and mobile * * Features: * - Configurable rotation modes (continuous or limited) * - Beautiful conic gradient disc with visual indicator * - Real-time angle display and feedback * - WebSocket communication for live updates * - Professional responsive UI design * * Hardware: ESP32 S3 Uno (add a servo or stepper motor if you want) * * Setup: * 1. Update WiFi credentials below * 2. Upload the sketch to your ESP32 S3 Uno * 3. Open Serial Monitor to see the IP address * 4. Navigate to http://[IP_ADDRESS]/web-rotator in your web browser */ #include <DIYables_ESP32_Platform.h> #include <DIYablesWebApps.h> // WiFi credentials - UPDATE THESE WITH YOUR NETWORK const char WIFI_SSID[] = "YOUR_WIFI_SSID"; const char WIFI_PASSWORD[] = "YOUR_WIFI_PASSWORD"; // Create WebApp server and page instances ESP32ServerFactory serverFactory; DIYablesWebAppServer webAppsServer(serverFactory, 80, 81); DIYablesHomePage homePage; // Rotator configuration constants const int ROTATOR_MODE = ROTATOR_MODE_CONTINUOUS; // Change to ROTATOR_MODE_LIMITED for limited rotation const float MIN_ANGLE = 0.0; // Minimum angle for limited mode const float MAX_ANGLE = 180.0; // Maximum angle for limited mode // Create WebRotator page with configuration //DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_CONTINUOUS); DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_LIMITED, MIN_ANGLE, MAX_ANGLE); // Variables for angle tracking float currentAngle = 0.0; void setup() { Serial.begin(9600); delay(1000); // TODO: Initialize your hardware pins here Serial.println("DIYables ESP32 WebApp - Web Rotator Example"); // Add pages to server webAppsServer.addApp(&homePage); webAppsServer.addApp(&webRotatorPage); // Set 404 Not Found page (optional - for better user experience) webAppsServer.setNotFoundPage(DIYablesNotFoundPage()); // Set callback functions for WebRotator webRotatorPage.onRotatorAngleFromWeb(onRotatorAngleReceived); // Start server webAppsServer.begin(WIFI_SSID, WIFI_PASSWORD); if (ROTATOR_MODE == ROTATOR_MODE_LIMITED) { Serial.println("\nRotator Mode: Limited"); Serial.print("Angle Range: "); Serial.print(MIN_ANGLE); Serial.print("° to "); Serial.print(MAX_ANGLE); Serial.println("°"); } else { Serial.println("\nRotator Mode: Continuous Rotation"); } Serial.println("\nTurn the disc in your web browser to control the rotator!"); } void loop() { // Handle web server and WebSocket connections webAppsServer.loop(); // Simulate rotator movement or control actual hardware here // For demonstration, we'll just echo back the received angle delay(10); } /** * Callback function called when angle is received from web interface * This is where you would control your actual rotator hardware */ void onRotatorAngleReceived(float angle) { currentAngle = angle; Serial.print("Rotator angle received: "); Serial.print(angle, 1); Serial.println("°"); // TODO: Add your rotator control code here // Examples: // - Control servo motor: servo.write(map(angle, 0, 360, 0, 180)); // - Control stepper motor: stepper.moveTo(angle * stepsPerDegree); // - Control DC motor with encoder feedback // - Send commands to external rotator controller // Note: No echo back to avoid interfering with smooth web interface rotation } /** * Example function to change rotator mode at runtime * Call this function to switch between continuous and limited modes */ void setRotatorMode(int mode, float minAng = 0, float maxAng = 360) { webRotatorPage.setRotatorMode(mode, minAng, maxAng); Serial.print("Rotator mode changed to: "); if (mode == ROTATOR_MODE_LIMITED) { Serial.print("Limited ("); Serial.print(minAng); Serial.print("° to "); Serial.print(maxAng); Serial.println("°)"); } else { Serial.println("Continuous"); } } /** * Example function to send angle updates to web interface * Call this function when your rotator position changes */ void sendAngleUpdate(float angle) { currentAngle = angle; webRotatorPage.sendToWebRotator(angle); Serial.print("Angle update sent to web: "); Serial.print(angle, 1); Serial.println("°"); }
  1. Set your WiFi: put your network name and password in these two lines:
const char WIFI_SSID[] = "YOUR_WIFI_SSID"; const char WIFI_PASSWORD[] = "YOUR_WIFI_PASSWORD";
  1. Upload: click the Upload button to send the code to the ESP32 S3 Uno.
  2. Open the Serial Monitor at 9600 baud. You should see something like this:
∞
Newbiely | Arduino IDE 2.3.8
──
☐
✕
File
Edit
Sketch
Tools
Help
ESP32S3 Dev Module
Newbiely.ino
···
8 Serial.println("Hello World!");
Output
Serial Monitor
Message (Enter to send message to 'ESP32S3 Dev Module' on 'COM15')
New Line
9600 baud
DIYables ESP32 WebApp - Web Rotator Example INFO: Added app / INFO: Added app /web-rotator DIYables WebApp Library Platform: ESP32 Network connected! IP address: 192.168.0.2 HTTP server started on port 80 Configuring WebSocket server callbacks... WebSocket server started on port 81 WebSocket URL: ws://192.168.0.2:81 WebSocket server started on port 81 ========================================== DIYables WebApp Ready! ========================================== 📱 Web Interface: http://192.168.0.2 🔗 WebSocket: ws://192.168.0.2:81 📋 Available Applications: 🏠 Home Page: http://192.168.0.2/ 🔄 Web Rotator: http://192.168.0.2/web-rotator ==========================================
Ln 11, Col 1
ESP32S3 Dev Module on COM15
2
  1. No output? Press the RESET button on the ESP32 S3 Uno and watch the Serial Monitor again.
  2. Open the home page: type the IP address from the Serial Monitor into the address bar of a browser on your phone or PC, for example http://192.168.0.2. You will see the home page:
ESP32 S3 Uno DIYables WebApp Home page with Web Rotator app
  1. Open the rotator: click the Web Rotator link. The Web Rotator app looks like this:
ESP32 S3 Uno DIYables WebApp Web Rotator app
  1. Turn the disc: drag it with the mouse or your finger. Each new angle shows up in the Serial Monitor.
  2. Tip: you can skip the home page and open the rotator directly by adding /web-rotator to the IP address, for example http://192.168.0.2/web-rotator. Bookmark it on your phone.

Web Interface Features

The page is small, but it gives you clear feedback. You always see where the disc points and which mode is active.

Rotatable Disc Control

Drag to rotate

Click and drag the disc, and it follows your movement. The rotation is smooth, and the gradient design makes the direction easy to see.

Angle and mode display

The current angle is shown in degrees next to the disc. A mode indicator tells you if the rotator is in continuous or limited mode, and shows the limits.

Touch and Mouse Support

On a computer you use the mouse. On a phone or tablet you touch and swipe. The layout adjusts to the screen size, and the marker shows clearly where you can grab the disc.

Code Configuration

You only need two things in your sketch: a rotator page object with the right mode, and a callback function that receives the angle.

Rotator Setup

Create the page in continuous mode or in limited mode, then connect your callback:

// Continuous rotation mode (full 0-360 degrees) DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_CONTINUOUS); // Limited rotation mode with custom range DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_LIMITED, 0.0, 180.0); // Set up angle callback webRotatorPage.onRotatorAngleFromWeb(onRotatorAngleReceived);

Receiving Angle Commands

The library calls this function each time you turn the disc. The angle comes as a float, so you get decimal precision. Put your motor code where the comment is.

void onRotatorAngleReceived(float angle) { Serial.print("Rotator angle received: "); Serial.print(angle, 1); Serial.println("°"); // Control your hardware here }

Operation Modes

The mode decides which angles the disc can send. Pick the one that matches the motor you want to drive.

Continuous Mode

In continuous mode the angle starts at 0° and can grow past 360° with no upper limit. It does not wrap back to 0°, so you can count full turns. This fits continuous rotation servos, antennas and turntables. Use ROTATOR_MODE_CONTINUOUS.

Limited Mode

In limited mode you set a minimum and a maximum angle, and the disc stops at these limits. This fits standard servos, robot arm joints and steering systems. Use ROTATOR_MODE_LIMITED, minAngle, maxAngle.

Hardware Integration

The angle from the web page is just a number. These two short examples show how to turn it into real motion on the ESP32 S3 Uno.

Servo Motor Control

※ NOTE THAT:

This is only a part of a sketch. Add it to your full ESP32 S3 Uno sketch (WiFi setup, server and pages) to make it work. The complete servo code is further down.

The ESP32 S3 Uno uses the ESP32Servo library instead of the standard Servo library. The servo signal wire goes to header pin D9, which is GPIO46 in code.

#include <ESP32Servo.h> Servo myServo; // Set rotator to limited mode: 0 to 180 degrees DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_LIMITED, 0.0, 180.0); void setup() { myServo.attach(46); // Servo on pin D9 (GPIO46) webRotatorPage.onRotatorAngleFromWeb(onRotatorAngleReceived); } void onRotatorAngleReceived(float angle) { // Directly write angle (0-180) to servo myServo.write((int)angle); }

Stepper Motor Control

For a stepper motor, convert the angle into a number of steps. The four driver inputs use header pins D8, D9, D10 and D11, which are GPIO21, GPIO46, GPIO10 and GPIO11 in code.

#include <Stepper.h> const int stepsPerRevolution = 200; Stepper myStepper(stepsPerRevolution, 21, 46, 10, 11); // D8, D9, D10, D11 void onRotatorAngleReceived(float angle) { // Calculate steps for desired angle int steps = (angle / 360.0) * stepsPerRevolution; myStepper.step(steps); }

Customization Options

You can shape the rotator to fit your machine. Most changes are just numbers in the constructor.

Angle Range

Set the lowest and highest allowed angle to protect your mechanics. You can also choose the start angle when the system boots, and how fine the angle updates should be.

Visual Appearance

The web page follows your configuration on its own. It shows the angle limits, the current mode and a marker for the current angle, all in the same smooth gradient style.

ESP32 S3 Uno Pinout

The image below shows the pinout diagram of the ESP32 S3 Uno form board. Use it to find header pin D9 and its GPIO number before you connect the servo.

ESP32 S3 Uno pinout diagram

Wiring Diagram

The servo has three wires: power, ground and signal. Connect the signal wire to D9 (GPIO46) as shown below.

The wiring diagram between ESP32 S3 Uno Servo Motor

This image is created using Fritzing. Click to enlarge image

Servo Pin ESP32 S3 Uno Pin
VCC (red) 5V
GND (black or brown) GND
Signal (yellow or orange) D9 (GPIO46)

WARNING

D9 is GPIO46, a boot strapping pin on the ESP32 S3 Uno. The board reads this pin at power-up to choose its boot mode. A servo signal wire is normally fine here, but if the board does not boot or cannot upload code, unplug the servo signal wire from D9, upload, and then plug it back in.

※ NOTE THAT:

The servo runs from 5V, but the ESP32 S3 Uno sends a 3.3V control signal. This is safe, because the signal goes out of the board, and most hobby servos accept 3.3V. For a big servo or a servo under load, use an external 5V supply and connect its GND to the ESP32 S3 Uno GND.

ESP32 S3 Uno Web Rotator with Servo Motor

This complete sketch connects the web disc to a servo motor on D9 (GPIO46). It uses limited mode from 0° to 180°, and it reverses the angle (180 - angle) so that the servo turns in the same direction as the disc. The pulse range 500 to 2400 µs fits an SG90 servo.

#include <DIYables_ESP32_Platform.h> #include <DIYablesWebApps.h> #include <ESP32Servo.h> Servo myServo; const int SERVO_PIN = 46; // The ESP32 S3 Uno pin D9 (GPIO46) connected to the servo signal wire // WiFi credentials - UPDATE THESE WITH YOUR NETWORK const char WIFI_SSID[] = "YOUR_WIFI_SSID"; const char WIFI_PASSWORD[] = "YOUR_WIFI_PASSWORD"; // Create WebApp server and page instances ESP32ServerFactory serverFactory; DIYablesWebAppServer webAppsServer(serverFactory, 80, 81); DIYablesHomePage homePage; // Rotator configuration constants const int ROTATOR_MODE = ROTATOR_MODE_CONTINUOUS; // Change to ROTATOR_MODE_LIMITED for limited rotation const float MIN_ANGLE = 0.0; // Minimum angle for limited mode const float MAX_ANGLE = 180.0; // Maximum angle for limited mode // Create WebRotator page with configuration //DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_CONTINUOUS); DIYablesWebRotatorPage webRotatorPage(ROTATOR_MODE_LIMITED, MIN_ANGLE, MAX_ANGLE); // Variables for angle tracking float currentAngle = 0.0; void setup() { Serial.begin(9600); delay(1000); // TODO: Initialize your hardware pins here myServo.attach(SERVO_PIN, 500, 2400); // SG90 Serial.println("DIYables ESP32 WebApp - Web Rotator Example"); // Add pages to server webAppsServer.addApp(&homePage); webAppsServer.addApp(&webRotatorPage); // Set 404 Not Found page (optional - for better user experience) webAppsServer.setNotFoundPage(DIYablesNotFoundPage()); // Set callback functions for WebRotator webRotatorPage.onRotatorAngleFromWeb(onRotatorAngleReceived); // Start server webAppsServer.begin(WIFI_SSID, WIFI_PASSWORD); delay(3000); Serial.print("WiFi Status: "); Serial.println(WiFi.status()); Serial.print("Local IP: "); Serial.println(WiFi.localIP()); if (ROTATOR_MODE == ROTATOR_MODE_LIMITED) { Serial.println("\nRotator Mode: Limited"); Serial.print("Angle Range: "); Serial.print(MIN_ANGLE); Serial.print("° to "); Serial.print(MAX_ANGLE); Serial.println("°"); } else { Serial.println("\nRotator Mode: Continuous Rotation"); } Serial.println("\nTurn the disc in your web browser to control the rotator!"); } void loop() { // Handle web server and WebSocket connections webAppsServer.loop(); // Simulate rotator movement or control actual hardware here // For demonstration, we'll just echo back the received angle delay(10); } /** * Callback function called when angle is received from web interface * This is where you would control your actual rotator hardware */ void onRotatorAngleReceived(float angle) { currentAngle = angle; Serial.print("Rotator angle received: "); Serial.print(angle, 1); Serial.println("°"); // TODO: Add your rotator control code here // Examples: // - Control servo motor: servo.write(map(angle, 0, 360, 0, 180)); // - Control stepper motor: stepper.moveTo(angle * stepsPerDegree); // - Control DC motor with encoder feedback // - Send commands to external rotator controller // Note: No echo back to avoid interfering with smooth web interface rotation angle = constrain(angle, 0, 180); int servoAngle = 180 - angle; myServo.write(servoAngle); } /** * Example function to change rotator mode at runtime * Call this function to switch between continuous and limited modes */ void setRotatorMode(int mode, float minAng = 0, float maxAng = 360) { webRotatorPage.setRotatorMode(mode, minAng, maxAng); Serial.print("Rotator mode changed to: "); if (mode == ROTATOR_MODE_LIMITED) { Serial.print("Limited ("); Serial.print(minAng); Serial.print("° to "); Serial.print(maxAng); Serial.println("°)"); } else { Serial.println("Continuous"); } } /** * Example function to send angle updates to web interface * Call this function when your rotator position changes */ void sendAngleUpdate(float angle) { currentAngle = angle; webRotatorPage.sendToWebRotator(angle); Serial.print("Angle update sent to web: "); Serial.print(angle, 1); Serial.println("°"); }

Watch the video below to see this ESP32 S3 Uno project step by step.

Common Use Cases

A rotary control from the web is useful in many projects. Here are some ideas to get you started.

Educational Projects

Students can learn how PWM drives a servo, how a robot arm joint is positioned, or how to point a directional antenna. A camera pan/tilt mount is another fun project you can control from your phone.

Practical Applications

At home, the rotator can open blinds, vents or small doors. In robotics, it can move arm joints or steer a mobile robot. It also works for remote positioning in IoT projects, and for valve or positioning control in small automation setups.

Common Problems

If something does not move as expected, check these points first. A full problem table is at the end of this page.

Rotation Not Working

Make sure the WiFi connection and the WebSocket are up. Check that the callback is set with onRotatorAngleFromWeb(). Then check the servo or motor wiring and its power supply.

Incorrect Angle Values

Check the angle mapping for your motor and the pin in the code. Make sure your callback scales the angle the right way, and watch the Serial Monitor to see the real values.

Connection Issues

Check the IP address in the browser and your firewall. The ESP32 S3 Uno works only with 2.4GHz WiFi, not 5GHz. Refreshing the browser page often helps.

Advanced Features

When the basic example works, you can make the rotator smarter. These functions are already in the example sketch.

Runtime Mode Changes

You can switch between continuous and limited mode while the sketch runs:

void setRotatorMode(int mode, float minAng = 0, float maxAng = 360) { webRotatorPage.setRotatorMode(mode, minAng, maxAng); Serial.print("Rotator mode changed to: "); if (mode == ROTATOR_MODE_LIMITED) { Serial.print("Limited ("); Serial.print(minAng); Serial.print("° to "); Serial.print(maxAng); Serial.println("°)"); } else { Serial.println("Continuous"); } }

Position Feedback

You can also send the real position back to the web page, for example from a motor with an encoder:

void sendAngleUpdate(float angle) { currentAngle = angle; webRotatorPage.sendToWebRotator(angle); Serial.print("Angle update sent to web: "); Serial.print(angle, 1); Serial.println("°"); }

※ NOTE THAT:

Sending many angle updates to the web page can make the disc move less smoothly. Use this feature only when you really need live position feedback.

Multi-Axis Control

Add two rotators to control two axes, for example pan and tilt:

DIYablesWebRotatorPage panRotator(ROTATOR_MODE_CONTINUOUS); DIYablesWebRotatorPage tiltRotator(ROTATOR_MODE_LIMITED, -90.0, 90.0); server.addApp(&panRotator); server.addApp(&tiltRotator);

Educational Integration

The WebRotator is a good tool for the classroom. It links web technology with real motion, so students see the result of their code at once.

STEM Learning Objectives

Students learn how servo and stepper motors work, how angles describe a position, how a real-time web interface talks to hardware, and how callback functions run code when an event happens.

Classroom Activities

Try servo calibration to learn about PWM signals, then practice precise positioning tasks. Next, combine sensors with motor control, and finish with debugging hardware and software problems together.

This example gives you a solid base for rotation control on the ESP32 S3 Uno, for both learning and real robotics projects. You can find more web apps in the ESP32 S3 Uno DIYables Web Apps tutorial.

FAQ

Which library do I use for the web rotator on the ESP32 S3 Uno?

Use the "DIYables ESP32 WebApps" library by DIYables, not the "DIYables WebApps" library for the UNO R4. The ESP32 version needs #include <DIYables_ESP32_Platform.h> and ESP32ServerFactory instead of UnoR4ServerFactory.

Why does the ESP32 S3 Uno servo code use ESP32Servo.h?

The standard Servo library does not support the ESP32 S3 Uno. Install the "ESP32Servo" library by Kevin Harrington and include ESP32Servo.h. The functions attach() and write() work the same way.

Can I power the servo from the ESP32 S3 Uno 5V pin?

A small servo like the SG90 with no load usually works from the 5V pin. A bigger servo or a servo under load can pull a big current spike and reset the board. In that case, use an external 5V supply and connect its GND to the ESP32 S3 Uno GND.

Is the 3.3V signal of the ESP32 S3 Uno enough for a 5V servo?

Yes, for most hobby servos. The signal goes out of the board, so it cannot harm the ESP32 S3 Uno pins, and the servo reads 3.3V as a high level. Never connect a 5V signal into an ESP32 S3 Uno pin, because the pins are not 5V tolerant.

Why can I not open the web rotator page?

Your phone or PC must be on the same WiFi network as the ESP32 S3 Uno. The board works only with 2.4GHz WiFi. Check the IP address in the Serial Monitor and type it exactly, for example http://192.168.0.2/web-rotator.

What if my project needs more pins than the Uno headers give?

The ESP32 S3 Uno has two extra rows of holes with more GPIOs: GPIO15 and GPIO16 (I/O, PWM, analog), GPIO45 and GPIO35 to GPIO42 (I/O, PWM), and GPIO47/GPIO48 (output only, PWM). Solder pin headers to use them and write the GPIO number in code. For extra servos or stepper driver inputs, GPIO35 to GPIO42 are a good choice. Be careful with two things: GPIO47/GPIO48 may run at 1.8V instead of 3.3V on some modules (especially ones with "V" in the name, like R8V or R16V), so 3.3V devices can be damaged or act strangely. Also, GPIO0, GPIO3 (D6), GPIO45 and GPIO46 (D9) are boot strapping pins, and a wrong connection can stop the board from booting or uploading code. Use the other extra pins first.

Troubleshooting

Problem Possible Cause Solution
No COM port in Arduino IDE USB driver missing or board not in upload mode Install the CP210x or CH340 driver, use a data USB cable, or hold BOOT while pressing RESET
Upload fails while the servo is connected The servo signal on D9 (GPIO46) affects the boot strapping pin Unplug the servo signal wire from D9, upload, then plug it back in
Board resets when the servo moves The servo pulls too much current from the board Power the servo from an external 5V supply and share GND with the ESP32 S3 Uno
Compile error "Servo.h" not found or not supported The standard Servo library is used Install the ESP32Servo library and use #include
Compile error on UnoR4ServerFactory Code for the UNO R4 library is used Install DIYables ESP32 WebApps and use ESP32ServerFactory with DIYables_ESP32_Platform.h
No IP address in the Serial Monitor Wrong WiFi name or password, or a 5GHz network Check WIFI_SSID and WIFI_PASSWORD and use a 2.4GHz network
Servo turns the wrong way The servo code reverses the angle with 180 - angle Use myServo.write(angle) instead if you want the other direction
Serial Monitor shows strange characters Wrong baud rate Set the Serial Monitor to 9600 baud

※ OUR MESSAGES

  • As freelancers, We are AVAILABLE for HIRE. See how to outsource your project to us
  • Please feel free to share the link of this tutorial. However, Please do not use our content on any other websites. We invested a lot of effort and time to create the content, please respect our work!