DIYables Web Apps Web Plotter
Overview
This ESP32 S3 Uno web plotter tutorial shows you how to turn sensor data into a live chart that you can open in any web browser. You use the DIYables ESP32 WebApps library on the ESP32 S3 Uno form board, so you do not need to write any HTML or JavaScript. The data travels over WebSocket, and the real-time plot updates on your phone or PC while the board is running.
In this tutorial, you will:
- Install the DIYables ESP32 WebApps library in Arduino IDE
- Run the WebPlotter example and open the plot page over WiFi
- Send real sensor readings to the web-based chart instead of simulated data
- Change the plot title, axis labels and Y-axis range
- Plot DHT11 temperature and humidity data in real time

Watch this video to see the Web Plotter app working with a DHT sensor:
Features
A plot shows you in one look what a column of numbers in the Serial Monitor cannot: trends, spikes and noise. The Web Plotter app brings this view to your browser, and it works without a USB cable once the code is running.
Real-time plotting
New values appear on the chart as soon as the ESP32 S3 Uno sends them, so you watch your sensor change live.
Up to 8 data series
You can draw up to eight lines at the same time, each in its own color. This is handy when you compare several sensors.
Automatic Y-axis scaling
The chart can adjust the Y-axis to fit your data, so you do not have to guess the range in advance.
Interactive chart
You can zoom and pan to look closer at a part of the data.
Fast WebSocket link
Data goes from the board to the browser over WebSocket, so the delay is very small.
Works on any device
The page is responsive. It runs in the browser of a phone, tablet or computer on the same WiFi network.
Easy to configure
You set the plot title, the axis labels and the Y-axis range with a few lines of code.
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) |
Or you can buy the following kits:
| 1 | × | DIYables Sensor Kit (18 sensors/displays) |
Additionally, some of these links are for products from our own brand, DIYables .
ESP32 S3 Uno Pinout
The image below shows the pinout diagram of the ESP32 S3 Uno form board. Use it to find the Uno header pins (A0, D2…) and their GPIO numbers when you connect your own sensors to the plotter.

Setup Instructions
Detailed Instructions
The basic example needs no wiring. It makes simulated data and also reads pin A0 (GPIO2), so you can test the plotter with just the board and a USB cable.
- New to the ESP32 S3 Uno? Follow ESP32 S3 Uno - Getting Started first.
- Wire it up: no wiring is needed for this example. You can add a sensor on A0 (GPIO2) later.
- Connect the board to your computer with a USB Type-C cable.
- Open Arduino IDE, choose the ESP32S3 Dev Module board and the correct COM port.
- Open the Library Manager by clicking the Libraries icon on the left bar of Arduino IDE.
- Search the library: type "DIYables ESP32 WebApps" and find the DIYables ESP32 WebApps Library by DIYables.
- Install it: click the Install button.
- Search for DIYables ESP32 WebApps created by DIYables and click the Install button.
- Install the dependencies: Arduino IDE asks to install some other libraries. Click Install All.
- Open the example: go to File Examples DIYables ESP32 WebApps WebPlotter, or copy the code below into Arduino IDE. The code below uses analogRead(2) for A0 and sets the ADC attenuation for the ESP32 S3 Uno.
The sketch creates a home page and a Web Plotter page, then joins your WiFi network. Every second it builds four values (a simulated temperature, humidity and light level, plus the real reading of A0) and sends them to the chart with sendPlotData(). It also prints the same values to the Serial Monitor.
The line analogSetAttenuation(ADC_11db); in setup() matters for the A0 reading. By default the ESP32 S3 Uno ADC can only measure a small voltage. With 11 dB attenuation, the analog pin reads the full range from 0V up to about 3.3V. Without it, the reading hits 4095 too early and the values look wrong.
- Set your WiFi: put your network name and password in these two lines:
- Upload: click the Upload button to send the code to the ESP32 S3 Uno.
- Open the Serial Monitor at 9600 baud. You should see something like this:
- No output? Press the RESET button on the ESP32 S3 Uno and watch the Serial Monitor again.
- 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:

- Open the plotter: click the Web Plotter link. The Web Plotter app looks like this:

- Watch the data: the ESP32 S3 Uno sends simulated sensor data, and you see several colored lines move across the chart in real time.
- Tip: you can skip the home page and open the plotter directly by adding /web-plotter to the IP address, for example http://192.168.0.2/web-plotter. Bookmark it on your phone.
Creative Customization - Visualize Your Data Creatively
The simulated data is only there so you can test the page. The real value comes when you plot your own sensors. The snippets below show common patterns. On the ESP32 S3 Uno, write the GPIO number in analogRead(): A0 = GPIO2, A1 = GPIO1, A2 = GPIO7. The ADC gives 0 to 4095 (12-bit) and the reference voltage is 3.3V. Keep analogSetAttenuation(ADC_11db); in setup() whenever you read an analog sensor.
Data Source Configuration
Swap the fake values for real readings. You can send one value, several values, or a whole array.
Method 1: Single Sensor Reading
This example reads an LM35 temperature sensor on A0. The LM35 gives 10mV per °C, so the math turns the 12-bit reading into a voltage and then into degrees.
Method 2: Multiple Sensors
Pass several values in one call, and each one becomes its own line on the chart.
Method 3: Array of Values
When you have many values, put them in an array and pass the array with its length.
Plot Customization
A clear title and good axis labels make the chart easy to read, especially when you show it to someone else.
Custom Plot Appearance
Use a fixed Y-axis range when you know the limits of your data. More samples show a longer history.
Dynamic Configuration
Turn on auto scaling when the range changes a lot. The onPlotterDataRequest() callback runs when a browser connects, so you can send a first batch of data right away.
Advanced Data Processing
Raw sensor data is often noisy. A little processing on the ESP32 S3 Uno makes the chart much easier to read.
Moving Average Filter
This filter keeps the last 10 readings and returns their average. The sketch plots the raw value and the smooth value side by side, so you can see the effect.
Data Logging with Timestamps
Here the time in seconds is sent as its own series next to the sensor value. The same data also goes to the Serial Monitor for debugging.
Integration Examples
These examples show how the plotter fits into real projects. Change the pins and the math to match your parts.
Environmental Monitoring
A DHT22 sensor on D2 (GPIO18) gives temperature and humidity, and a light sensor on A0 (GPIO2) adds a third line. The code only plots when the DHT reading is valid.
Motor Control Feedback
This snippet plots motor speed, current and position. Note the math uses 4095 and 3.3V, because the ESP32 S3 Uno ADC is 12-bit and runs at 3.3V.
PID Controller Visualization
Tuning a PID loop is much easier when you can see it. This code plots the setpoint, the input, the error and the output on one chart.
Performance Optimization
Sending data too often can slow down the browser and fill the WiFi link. These two patterns keep things smooth.
Efficient Data Transmission
Send data at a fixed interval with millis(), not on every loop. Here the interval is 100ms.
Conditional Data Sending
Send a new point only when the value changes by more than a threshold. This saves bandwidth when the sensor is stable.
Project Ideas
A live chart is useful in many kinds of projects. Here are some ideas to get you started with the ESP32 S3 Uno and the Web Plotter.
Scientific Applications
Build a data logger that records temperature, humidity and pressure over time. You can also study vibration with an accelerometer, track the pH of water in an aquaponics system, or compare the voltage and current of a solar panel with the amount of sunlight.
Educational Projects
Plot the swing of a pendulum or the bounce of a spring in a physics class. In chemistry, watch the temperature of a reaction. In biology, follow the sensors around a growing plant. In math, draw functions and the output of your own algorithms.
Home Automation
Watch your power use over a day, follow soil moisture and light in the garden, check temperature and humidity trends for heating and cooling, or plot the activity of a motion sensor.
Robotics and Control
Plot the position and heading of a robot, the speed and torque of a motor, the result of combining several sensors, or the path your robot plans to follow.
Common Problems and Debug Tips
Most plotter problems come from WiFi, the WebSocket link or noisy data. Check the points below before you change your code.
Common Issues
No data appears on the plot
Check that the ESP32 S3 Uno is connected to WiFi and look for errors in the Serial Monitor. Open the browser console to see if the WebSocket link is up. Make sure your code calls sendPlotData() on a regular basis.
The plot is jumpy or erratic
Add a moving average filter or send data less often. Check the sensor wires for loose contacts, and make sure the power supply is stable. A floating analog pin with nothing connected also gives random values.
The browser becomes slow
Lower the number of samples with setMaxSamples(), send data less often, close other browser tabs, and turn on hardware acceleration in the browser.
The WebSocket connection drops
Check the WiFi signal strength and move the board closer to the router. Make sure your router or firewall does not block port 81. Add reconnection logic to your own code if needed, and keep an eye on the free memory of the ESP32 S3 Uno.
Debug Tips
Enable Detailed Logging
Print some status data to the Serial Monitor. On the ESP32 S3 Uno, ESP.getFreeHeap() returns the free RAM in bytes.
Test Data Generation
If you are not sure whether the problem is your sensor or the plotter, send a known pattern. A clean sine, cosine and ramp on the chart proves that the web part works.
Advanced Features
When the basic plot works, you can go further: format the data yourself, combine the plotter with other apps, or control hardware while you watch the result.
Custom Data Formatting
You can also send one text line with values separated by tabs. This gives you full control over the number of decimals.
Integration with Other WebApps
The plotter can run next to other apps of the same library. In this example a slider changes what gets plotted.
Real-time Control with Plotting
Read a target value, drive a PWM output, read the feedback and plot target against actual. The PWM output is on D9 (GPIO46). Because the ADC gives 0 to 4095 and analogWrite() takes 0 to 255, the code divides by 16.
WARNING
D9 (GPIO46) is a boot strapping pin on the ESP32 S3 Uno. The board reads it at startup to choose the boot mode. If your motor driver pulls this pin high or low during reset, the board may not boot or may fail to upload code. If that happens, unplug the wire while you upload, or move the PWM output to another pin.
ESP32 S3 Uno Web Plotter with DHT11 Sensor
Now plot real data from a DHT11 temperature and humidity sensor. The DHT11 works at 3.3V, so you can power it straight from the ESP32 S3 Uno. Connect its DATA pin to D2 (GPIO18).
| DHT11 Pin | ESP32 S3 Uno Pin |
|---|---|
| VCC | 3.3V |
| GND | GND |
| DATA | D2 (GPIO18) |
Install the "DHT sensor library" by Adafruit from the Library Manager, then use the complete code below. It sets DHT_PIN to 18, starts the sensor in setup(), and has a sendEnvironmentalData() function that sends temperature and humidity to the plotter.
Watch the video below to see this ESP32 S3 Uno project step by step.
Next Steps
When the plotter works well, try the other apps of the same library:
- Multiple Web Apps – combine the plot with control pages
- WebMonitor – add a Serial Monitor in the browser next to your plot
- Build your own special plotting tool for your project
- Add simple statistics, like minimum, maximum and average, to the plotted data
Support
If you get stuck, read the DIYables ESP32 WebApps library reference and the other ESP32 S3 Uno WebApps tutorials on this site. The browser developer console helps you debug the WebSocket link, and the Arduino and Espressif community forums are good places to ask.
FAQ
Can I use the Web Plotter instead of the Arduino IDE Serial Plotter?
Yes. The Web Plotter shows the same kind of live chart, but in a web browser over WiFi. You do not need a USB cable once the code runs, and you can open the chart on your phone.
Why does my ESP32 S3 Uno analog value go up to 4095 and not 1023?
The ESP32 S3 Uno ADC is 12-bit, so analogRead() returns 0 to 4095. Boards like the UNO R4 use 10-bit by default and return 0 to 1023. Change any math that uses 1023 to 4095, and use 3.3V instead of 5V for voltage math.
Why does the code call analogSetAttenuation(ADC_11db)?
It sets the ESP32 S3 Uno ADC input range to about 0 to 3.3V, so the full sensor signal maps to 0 to 4095. Without it the range is smaller and the readings hit the top too early. The UNO R4 does not need this line, because it is for ESP32 only. Keep the sensor output at 3.3V or less.
Which pins can I use for analog sensors on the plotter?
Use A0 to A5 on the Uno header, and write the GPIO number in code: A0 = 2, A1 = 1, A2 = 7, A3 = 6, A4 = 5, A5 = 4. Many digital header pins (like D2, D3 and D7) can also read analog values. Remember that the pins are NOT 5V tolerant.
Why can't my ESP32 S3 Uno connect to my WiFi?
The ESP32 S3 Uno supports only 2.4GHz WiFi. If your router uses one name for both bands, try a separate 2.4GHz network. Also check the SSID and password, because they are case sensitive.
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 them and write the GPIO number in your code. For more analog sensors on the plot, use GPIO15 and GPIO16. For digital inputs, use GPIO35 to GPIO42, not GPIO47/48. Be careful with two things. First, GPIO47 and 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. Second, 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 charge-only cable | Install the CP210x or CH340 driver, use a data USB cable, or hold BOOT while pressing RESET |
| Serial Monitor shows Failed to start WebApp server | Wrong SSID or password, or a 5GHz network | Check the WiFi details and use a 2.4GHz network |
| Plot page does not load | Wrong IP address or the device is on another network | Use the IP from the Serial Monitor and join the same WiFi |
| Page loads but the chart stays empty | WebSocket port 81 is blocked or sendPlotData() is not called | Refresh the page, check port 81, and call sendPlotData() at a fixed interval |
| A0 line is noisy or random | Nothing is connected to A0, so the pin floats | Connect a sensor to A0 (GPIO2) or ignore that line while testing |
| Analog values stay at 4095 | Missing ADC attenuation or input above 3.3V | Keep analogSetAttenuation(ADC_11db) in setup() and keep the signal at 3.3V or less |
| DHT11 values never appear | Wrong data pin, loose wire, or missing library | Wire DATA to D2 (GPIO18), use DHT_PIN 18, and install the DHT sensor library |
| Code does not compile | Wrong library or wrong board | Install DIYables ESP32 WebApps and choose ESP32S3 Dev Module |