DIYables ESP32 Web Apps Web Plotter
Overview
The WebPlotter example creates a real-time data visualization interface accessible through any web browser. Designed for ESP32 educational platform with enhanced data processing capabilities, real-time plotting features, and seamless integration with sensor monitoring systems. Perfect for visualizing sensor data, debugging algorithms, or monitoring system performance in real-time.

Features
- Real-time Data Plotting: Visualize sensor data as it streams from Arduino
- Multiple Data Series: Plot up to 8 different data streams simultaneously
- Auto-scaling: Automatic Y-axis scaling based on data range
- Interactive Interface: Zoom, pan, and analyze data trends
- WebSocket Communication: Instant updates with minimal latency
- Responsive Design: Works on desktop, tablet, and mobile devices
- Customizable Configuration: Adjustable plot titles, axis labels, and ranges
Hardware Used In This Tutorial
Or you can buy the following kits:
1 | × | DIYables ESP32 Starter Kit (ESP32 included) | |
1 | × | DIYables Sensor Kit (30 sensors/displays) | |
1 | × | DIYables Sensor Kit (18 sensors/displays) |
Setup Instructions
Quick Instructions
Follow these instructions step by step:
- If this is your first time using the ESP32, refer to the tutorial on setting up the environment for ESP32 in the Arduino IDE.
- Connect the ESP32 board to your computer using a USB cable.
- Launch the Arduino IDE on your computer.
- Select the appropriate ESP32 board (e.g. ESP32 Dev Module) and COM port.
- Navigate to the Libraries icon on the left bar of the Arduino IDE.
- Search "DIYables ESP32 WebApps", then find the DIYables ESP32 WebApps Library by DIYables
- Click Install button to install the library.

- You will be asked for installing some other library dependencies
- Click Install All button to install all library dependencies.

- On Arduino IDE, Go to File Examples DIYables ESP32 WebApps WebPlotter example, or copy the above code and paste it to the editor of Arduino IDE
- Configure WiFi credentials in the code by updating these lines:
- Click Upload button on Arduino IDE to upload code to ESP32
- Open the Serial Monitor
- Check out the result on Serial Monitor. It looks like the below
- If you do not see anything, reboot ESP32 board.
- Take note of the IP address displayed, and enter this address into the address bar of a web browser on your smartphone or PC.
- Example: http://192.168.0.2
- You will see the home page like below image:

- Click to the Web Plotter link, you will see the Web Plotter app's UI like the below:

- Or you can also access the page directly by IP address followed by /web-plotter. For example: http://192.168.0.2/web-plotter
- Watch as the ESP32 generates simulated sensor data and plots it in real-time. You'll see multiple colored lines representing different data streams.
Creative Customization - Visualize Your Data Creatively
Transform the plotting interface to match your unique project requirements and create stunning data visualizations:
Data Source Configuration
Replace simulated data with real sensor readings:
Method 1: Single Sensor Reading
Method 2: Multiple Sensors
Method 3: Array of Values
Plot Customization
Custom Plot Appearance
Dynamic Configuration
Advanced Data Processing
Moving Average Filter
Data Logging with Timestamps
Integration Examples
Environmental Monitoring
Motor Control Feedback
PID Controller Visualization
Performance Optimization
Efficient Data Transmission
Conditional Data Sending
Project Ideas
Scientific Applications
- Data Logger: Record temperature, humidity, pressure over time
- Vibration Analysis: Monitor accelerometer data for mechanical systems
- pH Monitoring: Track water quality in aquaponics systems
- Solar Panel Efficiency: Monitor voltage/current output vs. sunlight
Educational Projects
- Physics Experiments: Visualize pendulum motion, spring oscillations
- Chemistry Lab: Monitor reaction rates and temperature changes
- Biology Studies: Track plant growth sensors, environmental factors
- Mathematics: Plot mathematical functions and algorithmic outputs
Home Automation
- Energy Monitoring: Track power consumption patterns
- Garden Automation: Monitor soil moisture, light levels
- HVAC Control: Visualize temperature and humidity trends
- Security System: Plot motion sensor activities
Robotics and Control
- Robot Navigation: Plot position and orientation data
- Motor Control: Monitor speed, torque, and efficiency
- Sensor Fusion: Combine multiple sensor readings
- Path Planning: Visualize robot movement algorithms
Troubleshooting
Common Issues
1. No data appearing on plot
- Check WiFi connection status
- Verify WebSocket connection in browser console
- Ensure sendPlotData() is being called regularly
- Check Serial Monitor for error messages
2. Plot appears jumpy or erratic
- Implement data filtering (moving average)
- Reduce data sending frequency
- Check for sensor noise or connection issues
- Verify power supply stability
3. Browser performance issues
- Reduce maximum samples (setMaxSamples())
- Lower data transmission rate
- Close other browser tabs
- Use hardware acceleration in browser
4. WebSocket connection drops
- Check WiFi signal strength
- Verify router settings (firewall, port blocking)
- Implement reconnection logic in custom code
- Monitor ESP32 memory usage
Debug Tips
Enable Detailed Logging
Test Data Generation
Advanced Features
Custom Data Formatting
Integration with Other WebApps
Real-time Control with Plotting
Next Steps
After mastering the WebPlotter example, explore:
- MultipleWebApps - Combine plotting with control interfaces
- WebMonitor - Add debugging capabilities alongside plotting
- Custom Applications - Build your own specialized plotting tools
- Data Analysis - Implement statistical analysis of plotted data
Support
For additional help:
- Check the API Reference documentation
- Visit DIYables tutorials: https://esp32io.com/tutorials/diyables-esp32-webapps
- ESP32 community forums
- WebSocket debugging tools in browser developer console