Skip to content

Example Sketches

In the example folder there are six sub directories for different ArduCAM models and the host application. Directories structure lists as Figure 1 shown. The ESP8266 folder is for ArduCAM-ESP8266-UNO board examples. The Mini folder is for ArduCAM-Mini-2MP and ArduCAM-Mini-5MP modules. The Mini_5MP_Plus folder is for ArduCAM-Mini-5MP-Plus (OV5640/OV5642) modules. The RevC folder is for ArduCAM-Shield-RevC or ArduCAM-Shield-RevC+ shields. The Shield_V2 folder is for ArduCAM-Shield-V2 shield. The host_app folder is host capture and display application for all of ArduCAM modules.

arducam-lib-1024x848

Figure 1 Example Folder Structure

1. ArduCAM Mini Examples

The mini folder contains examples for ArduCAM Mini shields. All of the examples are designed for ArduCAM-Mini-2MP and ArduCAM-Mini-5MP, and will take effect automatically according to the Macro definition in the memorysaver.h file.

1.1 ArduCAM_Mini_Video_Streaming

This example illustrates how to send continues capture commands to ArduCAM and transfer the JPEG image data back to host application via Arduino onboard USB-Serial interface. Note that the higher resolution wills cause higher image size and reduce the streaming frame rate accordingly. These examples should work with host application to view the captured images.

1.2 ArduCAM_Mini_LowPowerMode

This example is similar to example 1.1, and illustrates how to disable unwanted power consumption from the sensor and memory chip after each capture. It is useful for battery powered application. This example is recommended for ArduCAM mini 5MP module, because it will become extremely hot when running in full power. These examples should work with host application to view the captured images.

1.3 ArduCAM_Mini_Capture2SD

This example demonstrates how to capture time elapse image and save to TF/SD card.

1.4 ArduCAM_Mini_Video2SD

This example demonstrates how to capture low resolution and low frame rate MJPEG video to AVI file.

1.5 ArduCAM_Mini_4CAM

This example demonstrates how to connect 4 ArduCAM-Mini (2MP or 5MP) to ArduCAM multi-camera adapter board and capture images over the USB-Serial similar to example 1.1. This example should work with this host application.

2. ArduCAM Mini 5MP Plus Examples

Similar to ArduCAM Mini examples, the examples in this folder is designed for ArduCAM-Mini-5MP-Plus (OV5640/OV5642) modules with additional performance and features.

2.1 ArduCAM_Mini_5MP_Plus_Video_Streaming

Similar to ArduCAM-Mini example, see section 1.1.

2.2 ArduCAM_Mini_5MP_Plus_LowPowerMode

Similar to ArduCAM-Mini example, see section 1.2.

2.3 ArduCAM_Mini_5MP_Plus_Multi_Capture2SD

This example illustrates how to capture continuous pictures then save to TF/SD card, the maximum allowed pictures numbers is limited to 7. This example is useful if you want to create HDR image with different exposure value by manually set different exposure value at the beginning of each frame.

2.3 ArduCAM_Mini_5MP_Plus_Multi_Capture2SD

This example illustrates how to record short movie clip by capturing continuous JPEG images until the entire 8MByte frame buffer is full, then save the MJPEG images as an AVI file into TF/SD card. You can playback the avi file on your PC media player software.

2.4 ArduCAM_Mini_5MP_Plus_short_movie_clip

Similar to ArduCAM-Mini example, see section 4.1.5.

2.5 ArduCAM_Mini_5MP_Plus_4CAM

The REVC folder contains examples for ArduCAM Rev.C and Rev.C+ shield. It requires additional UTFT4ArduCAM_SPI library as mentioned earlier. All of the examples are designed for different camera modules, and will take effect automatically according to the Macro definition in the memorysaver.h file.

4.3 ArduCAM REVC Examples

This example captures a 320x240 resolution BMP file and stores into SD card memory, then playback captured image on LCD screen if press the shutter button more than 3 seconds.

3.1 ArduCAM_Camera_Playback

This example acts like a true point to shoot digital camera. It starts live preview on LCD screen, and captures high resolution JPEG image after press the shutter button. Note that the image size has to fit into the onboard frame buffer size in order to prevent buffer overflow.

3.2 ArduCAM_Digital_Camera

Similar to ArduCAM-Mini example, see section 1.1.

3.3 ArduCAM_Video_Streaming

Similar to ArduCAM-Mini example, see section 1.3.

3.4 ArduCAM_Capture2SD

Similar to ArduCAM-Mini example, see section 1.4.

3.5 ArduCAM_Video2SD

Similar to ArduCAM Shield Rev.C/Rev.C+ and ArduCAM-Mini-5MP-Plus examples, the examples in this folder is designed for ArduCAM-Shield-V2 with additional performance and features. All of the examples are designed for different camera modules, and will take effect automatically according to the Macro definition in the memorysaver.h file. And examples also work with ArduCAM-Nano-ESP8266 module.

4。 ArduCAM Shield V2 Examples

4.1 ArduCAM_Camera_Playback

Similar to ArduCAM-Mini example, see section 3.1.

4.2 ArduCAM_Digital_Camera

Similar to ArduCAM-Mini example, see section 3.2.

4.3 ArduCAM_Video_Streaming

Similar to ArduCAM-Mini example, see section 1.1.

4.4 ArduCAM_Multi_Capture2SD

Similar to ArduCAM-Mini example, see section 2.3.

4.5 ArduCAM_short_movie_clip

Similar to ArduCAM-Mini example, see section 2.4.

4.6 ArduCAM_MT9M001_Camera_RAW

This example captures a 1280x1240 resolution bayer RAW image and stores into TF/SD card memory. The LCD screen will look weird because the LCD only support RGB565 format, when the video is RAW format, the color represents incorrectly.

5. ESP8266 UNO Examples

The examples in the ESP8266 folder is for ArduCAM ESP8266 UNO board V1 or V2, and should work with ArduCAM-Mini and ArduCAM-Mini-Plus modules.

5.1 ArduCAM_ESP8266_OVxxxx_Capture

This example demonstrates how to capture image over HTTP standard protocol and display the captured image/video on the webpage in the html folder. The example is configured as AP mode with default IP address 192.168.4.1 without password. You can also manually modify the parameters in the example to configure the camera as station mode and connect to your home router.

5.2 ArduCAM_ESP8266_Vx_OVxxxx_Capture2SD

Similar to ArduCAM-Mini example, see section 1.3.

5.3 ArduCAM_ESP8266_Vx_OVxxxx_Video2SD

Similar to ArduCAM-Mini example, see section 1.4.