This repository demonstrates a proof-of-concept (POC) project that integrates an Arducam SPI Camera Module with a WIZnet W5500 Ethernet module to capture high-resolution images and serve them via a webserver. The implementation focuses on efficient memory management and seamless transmission of large image data in an embedded environment.
- Capture high-resolution images using Arducam SPI Mini.
- Serve images via a lightweight webserver running on W5500.
- Adjustable resolution settings accessible from the web interface.
- Custom HTTP response handling for efficient image transmission.
- Optimized for handling large image data with a 100 KB buffer.
The repository is organized as follows:
Examples/
: Contains the main application code integrating the camera and webserver.Libraries/
: Includes the Arducam library and WIZnet ioLibrary for camera and networking functionality.Port/
: Holds customized code for the project, including changes to SPI handling, buffer management, and camera capture logic.
The Arducam library was sourced from the official Arducam RPI-Pico-Cam GitHub Repository. Key modifications include:
- Updating SPI pin definitions to avoid conflicts with the WIZnet ioLibrary.
- Adding a custom
capture
function to pass buffer and size as parameters. - Validating the JPEG end marker (
FF D9
) to ensure image integrity.
The webserver code is customized to handle large image transmissions:
- A custom function was implemented to send the HTTP header and image buffer together for better efficiency.
- The image buffer is divided into 8 KB chunks and transmitted sequentially to avoid overloading the W5500's buffer.
- CGI processor code was updated to handle camera-specific POST requests.
- A global buffer of 100 KB is allocated to store the captured image.
- Memory allocation and usage were refined through trial and error to ensure stability and performance.
- Both TX and RX buffers in the W5500 were set to 16 KB for optimized data handling.
The project demonstrates seamless integration of Arducam and W5500 for serving high-resolution images over a webserver. The results can be seen in the accompanying video demonstration.
Planned enhancements for the next iteration include:
- Dual-Core Operation:
- Using one core for camera operations and the other for networking.
- Advanced Camera Settings:
- Adding features like light mode, contrast adjustment, and image compression.
- Live Streaming:
- Implementing real-time video streaming via the webserver.
Arducam Team for their open-source library: Arducam RPI-Pico-Cam.
WIZnet for their ioLibrary and hardware support: WIZnet-PICO-C GitHub Repository