This project extends the Waveshare ESP32-S3-ETH Web Camera with additional features including:
- Automatic Streaming - Stream starts automatically when accessing the web interface
- GPIO Control - Digital and analog I/O control via REST API
- Network Configuration - API for reading and setting network parameters
- NeoPixel Control - Control the onboard RGB LED
- Waveshare ESP32-S3-ETH Board
- OV2640 Camera Module (included with the board)
- Ethernet cable for network connection
- USB-C cable for programming and power
- Arduino IDE (version 2.0 or newer recommended)
- Arduino CLI (for command-line compilation)
- ESP32 Board Support Package (version 2.0.5 or newer)
- Required Libraries:
- Adafruit NeoPixel (for RGB LED control)
To install the required libraries:
- Open Arduino IDE
- Go to Tools > Manage Libraries...
- Search for "Adafruit NeoPixel" and install it
- Connect the camera module to the camera connector on the ESP32-S3-ETH board
- Connect the Ethernet cable to your network
- Connect the USB-C cable to your computer
- Extract the ZIP file
- Open the project folder in Arduino IDE
- Select the correct board: Tools > Board > ESP32 Arduino > ESP32S3 Dev Module
- Set the following board options:
- USB CDC On Boot: Enabled
- CPU Frequency: 240MHz
- USB DFU On Boot: Enabled
- Flash Mode: QIO 80MHz
- Flash Size: 16MB
- Partition Scheme: Huge APP (3MB No OTA/1MB SPIFFS)
- PSRAM: OPI PSRAM
- Connect your ESP32-S3-ETH board via USB
- Click Upload
arduino-cli compile --fqbn esp32:esp32:esp32s3 \
--build-property "build.partitions=huge_app" \
--build-property "upload.maximum_size=3145728" \
--build-property "build.flash_mode=qio" \
--build-property "build.flash_freq=80m" \
--build-property "build.flash_size=16MB" \
--build-property "build.psram_type=opi" \
--build-property "build.cpu_frequency=240" \
--build-property "build.usb_cdc_on_boot=1" \
--build-property "build.usb_dfu_on_boot=1"- After uploading, the device will connect to your network with static IP 192.168.178.65
- Access the web interface at http://192.168.178.65
- The camera stream will start automatically
- Use the web interface to control camera settings and view the stream
| Endpoint | Description |
|---|---|
/stream |
Camera video stream |
/capture |
Capture a single image |
/status |
Get camera status |
/control |
Control camera parameters |
| Endpoint | Description | Example |
|---|---|---|
/gpio/do?pin=[pin]&state=[high/low] |
Set digital output | /gpio/do?pin=20&state=high |
/gpio/ai/read?pin=[pin] |
Read analog input | /gpio/ai/read?pin=0 |
/gpio/ao/set?pin=[pin]&value=[0-255] |
Set analog output (PWM) | /gpio/ao/set?pin=16&value=128 |
/gpio/do/all?pins=[pins]&states=[states] |
Control multiple digital outputs | /gpio/do/all?pins=16,17&states=high,low |
/gpio/overview |
Get overview of all GPIO pins | /gpio/overview |
| Endpoint | Description | Example |
|---|---|---|
/network/config/get |
Get current network configuration | /network/config/get |
/network/config/set |
Set network configuration | /network/config/set?dhcp=false&ip=192.168.178.65&gateway=192.168.178.1&apply=true |
/restart |
Restart the device | /restart |
| Endpoint | Description | Example |
|---|---|---|
/neopixel/set?color=[hex]&brightness=[0-255] |
Set NeoPixel color and brightness | /neopixel/set?color=FF0000&brightness=128 |
/neopixel/off |
Turn off NeoPixel | /neopixel/off |
The following GPIO pins are safe to use for digital/analog I/O:
- 0, 4, 5, 6, 7, 16, 17, 19, 20, 21, 33, 34, 35, 36, 37, 43, 44
Pins used by the camera and Ethernet are automatically protected from misuse.
The following pins can be used for analog input:
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
By default, the device uses a static IP configuration:
- IP: 192.168.178.65
- Gateway: 192.168.178.1
- Subnet: 255.255.255.0
- DNS1: 8.8.8.8
- DNS2: 8.8.4.4
You can change these settings using the network configuration API. The settings are stored in EEPROM and persist across reboots.
Example to set DHCP mode:
http://192.168.178.65/network/config/set?dhcp=true&apply=true
Example to set static IP:
http://192.168.178.65/network/config/set?dhcp=false&ip=192.168.1.100&gateway=192.168.1.1&subnet=255.255.255.0&apply=true
The onboard NeoPixel RGB LED is connected to GPIO 21. You can control its color and brightness using the NeoPixel API endpoints.
Example to set red color at half brightness:
http://192.168.178.65/neopixel/set?color=FF0000&brightness=128
Example to turn off the LED:
http://192.168.178.65/neopixel/off
You can control various camera settings through the web interface or via the /control API endpoint:
| Parameter | Values | Description |
|---|---|---|
| framesize | 0-13 | Resolution (0=QQVGA, 10=UXGA) |
| quality | 0-63 | JPEG quality (0=best, 63=worst) |
| brightness | -2 to 2 | Image brightness |
| contrast | -2 to 2 | Image contrast |
| saturation | -2 to 2 | Image saturation |
| special_effect | 0-6 | Special effects (0=none, 1=negative, etc.) |
| hmirror | 0/1 | Horizontal mirror |
| vflip | 0/1 | Vertical flip |
Example to set resolution to VGA and quality to 10:
http://192.168.178.65/control?var=framesize&val=5
http://192.168.178.65/control?var=quality&val=10
- ETH_Web_CAM_[timestamp].ino: Main Arduino sketch file
- app_httpd.cpp: HTTP server implementation and request handlers
- camera_index.h: Web interface HTML (compressed)
- network_config.h: Network configuration implementation
- neopixel.h: NeoPixel control implementation
- utilities.h: Utility functions
- partitions.csv: Partition table for ESP32-S3
- update_zipped_html.py: Script to update the compressed HTML
If you want to modify the web interface:
- Edit the CameraWeb.html file
- Run the update_zipped_html.py script to compress the HTML and update camera_index.h
- Recompile and upload the project
python update_zipped_html.py CameraWeb.html camera_index.h- Camera not working: Make sure the camera is properly connected and the ribbon cable is seated correctly.
- Network connection issues: Check your Ethernet cable and network settings.
- GPIO control not working: Verify you're using pins that are safe for GPIO control (see list above).
- Compilation errors: Make sure you have installed all required libraries and are using the correct board settings.
- Cannot access web interface: Verify the IP address by checking your router's DHCP client list or the serial monitor output.
You can use the GPIO API to control external hardware connected to the ESP32-S3-ETH board. For example:
- Connect LEDs to digital output pins
- Connect buttons or sensors to digital input pins
- Connect analog sensors to analog input pins
- Control motors or servos using PWM (analog output)
The REST API makes it easy to integrate with home automation systems:
- Use the camera stream in Home Assistant
- Control GPIO pins from Node-RED
- Monitor sensor values from custom dashboards
This project is based on the Waveshare ESP32-S3-ETH Web Camera example and is provided under the same license terms.
- Based on the ESP32 Camera example by Espressif
- Enhanced with additional features for the Waveshare ESP32-S3-ETH board