Skip to content

Arducam Qwiic Camera Web Server Tutorial

Hardware Connection

Please use the Qwiic cable to connect the Arducam Qwiic CAM to the Qwiic interface of the Arduino UNO R4 WiFi.

camera_web_server_picture_1

Software Preparation

  • Arduino IDE

  • Arduino UNO R4 WiFi Development Board Support Package

  • Arducam Qwiic CAM Arduino Library

camera_web_server_picture_2

Application Note

If the latest version of `Arducam_Qwiic_CAM` available for installation in the Arduino IDE is still 1.0.5, it is recommended to close the Arduino IDE first, then delete the cache files in the `C:\Users\ASUS\AppData\Local\Arduino15` directory. After reopening the Arduino IDE, download and install the library files again.

File Description

CameraWebServer
└── CameraWebServer.ino
File Description
CameraWebServer.ino CameraWebServer.ino Main program, including camera initialization, WiFi hotspot creation, web interface, HTTP request processing, photo taking, video preview, and parameter setting functions.

Upload Steps

  1. Open CameraWebServer.ino using the Arduino IDE.
    camera_web_server_picture_3
  2. Select the development board: Tools -> Board -> Arduino UNO R4 WiFi.
  3. Select the correct serial port: Tools -> Port
    camera_web_server_picture_4
  4. Click Upload to upload the program.
  5. Open the serial monitor and set the baud rate to 115200.
  6. After the program starts successfully, the serial monitor will display information similar to: camera_web_server_picture_5

WiFi Connection

After running the program, the Arduino UNO R4 WiFi will create a WiFi hotspot.

Project Content
WiFi Name Arducam_Qwiic_CAM
WiFi Password 123456789
Web Address 192.168.4.1

Connect to the WiFi using a PC or mobile phone:

SSID: Arducam_Qwiic_CAM
Password: 123456789

camera_web_server_picture_6

Then open the following address in your browser:

http://192.168.4.1

camera_web_server_picture_8

Webpage Function Description

The left side of the webpage is the camera control panel, and the right side is the image preview area.

camera_web_server_picture_7

Capture

Click the Capture button to capture an image and display it in your browser.

The behavior of Capture varies depending on the currently selected Image Format:

Image Format Description
JPEG Preview Captures a JPEG image and displays it directly in the browser
RGB565 Preview Captures a raw RGB565 image; the webpage uses Canvas decoding for display
Y8 Preview Captures a Y8 grayscale image; the webpage uses Canvas decoding for display

Stream

Click the Stream button to start a real-time JPEG preview. Click it again to stop the preview.

Note

`Stream` only supports JPEG preview. If the current Format is `RGB565` or `Y8`, the webpage will prompt you to switch to JPEG Preview first.

Resolution

Selects the image resolution.

For faster preview speeds, QVGA 320x240 is recommended.

Format

Format: Selects the image output format.

Image Format Description
JPEG Preview Compressed the image, suitable for web display and video preview
RGB565 Preview Original color image, larger data size
Y8 Preview Original grayscale image, only brightness information

Brightness

Adjusts image brightness

Contrast

Adjusts image contrast

Saturation

Adjusts image saturation

WB Mode

Sets white balance mode

Color FX

Sets image effects

Quality

Selects the JPEG image quality.

Lower image quality means smaller image data size, and generally faster webpage loading speed.

QWIIC support functions list
Functions Details Support
Format JPEG RGB Y8
Resolution 96x96, 128x128
320x240, 320x320
640x480, 1280x760
1600x1200, 1920x1080
2592x1944
96x96
128x128
320x240
96x96
128x128
320x240
Brightness Level -3 ~ Level +3
Contrast Level -3 ~ Level +3
Saturation Level -3 ~ Level +3
WB mode Auto Sunny Cloudy
Office Home /
Color FX Normal B&W negative Negative
B&W Reddish
(warm light)
Bluish
(cool light)
Greenish Antique /
Image quality High Default Low

Important Notes

- Your browser must be connected to the "**Arducam_Qwiic_CAM**" WiFi network to open the webpage.  
- The default webpage address is `http://192.168.4.1`  
- `Stream` mode only supports `JPEG`.  
- Use the `Capture` button for single-image preview for `RGB565/Y8`.  
- If images load slowly, it is recommended to lower the resolution or select Low quality.  
- Slow loading of RAW images is normal, as RAW data is larger than JPEG.  
- If the serial port displays "`camera not detected`," please check if the Qwiic connection cable is properly connected.  
- If it displays "`AP creation failed!`", you can reset the development board and run it again.