ArduCAM Typical Problems (RaspberryPi)

First compile

pi@raspberrypi:cd ArduCAM/example/raspberrypi

$ make
gcc -c default_fonts_spi.c -lwiringPi -Wall
gcc -c utft_spi.c -lwiringPi -Wall
gcc -c arducam.c -lwiringPi -Wall
gcc -c arducam_arch_raspberrypi.c -lwiringPi -Wall
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_init’:
arducam_arch_raspberrypi.c:25:2: warning: implicit declaration of fu
nction ‘wiringPiI2CSetup’ [-Wimplicit-function-declaration]
FD = wiringPiI2CSetup(sensor_addr);
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_write’:
arducam_arch_raspberrypi.c:55:3: warning: implicit declaration of fu
nction ‘wiringPiI2CWriteReg8’ [-Wimplicit-function-declaration]
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_read’:
arducam_arch_raspberrypi.c:66:3: warning: implicit declaration of fu
nction ‘wiringPiI2CReadReg8’ [-Wimplicit-function-declaration]
*regDat = wiringPiI2CReadReg8(FD,regID);
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_write16’:
arducam_arch_raspberrypi.c:76:3: warning: implicit declaration of fu
nction ‘wiringPiI2CWriteReg16’ [-Wimplicit-function-declaration]
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_read16’:
arducam_arch_raspberrypi.c:86:3: warning: implicit declaration of fu
nction ‘wiringPiI2CReadReg16’ [-Wimplicit-function-declaration]
*regDat = wiringPiI2CReadReg16(FD,regID);
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_word_write’:
arducam_arch_raspberrypi.c:101:3: warning: implicit declaration of f
unction ‘i2c_smbus_write_word_data’ [-Wimplicit-function-declaration
i2c_smbus_write_word_data(FD, reg_H, value);
arducam_arch_raspberrypi.c: In function ‘arducam_i2c_word_read’:
arducam_arch_raspberrypi.c:115:3: warning: implicit declaration of f
unction ‘i2c_smbus_write_byte_data’ [-Wimplicit-function-declaration
r = i2c_smbus_write_byte_data(FD,reg_H,reg_L);
arducam_arch_raspberrypi.c:118:3: warning: implicit declaration of f
unction ‘i2c_smbus_read_byte’ [-Wimplicit-function-declaration]
*regDat = i2c_smbus_read_byte(FD);
gcc -c arducam_ov2640_playback.c -lwiringPi -Wall
gcc -o ov2640_playback default_fonts_spi.o utft_spi.o arducam.o ardu
cam_arch_raspberrypi.o arducam_ov2640_playback.o -lwiringPi -Wall
arducam_arch_raspberrypi.o: In function `arducam_i2c_word_write’:
arducam_arch_raspberrypi.c:(.text+0x384): undefined reference to `i2
arducam_arch_raspberrypi.o: In function `arducam_i2c_word_read’:
arducam_arch_raspberrypi.c:(.text+0x400): undefined reference to `i2
arducam_arch_raspberrypi.c:(.text+0x428): undefined reference to `i2
collect2: error: ld returned 1 exit status
Makefile:6: recipe for target ‘ov2640_playback’ failed
make: *** [ov2640_playback] Error 1

The solutions:

sudo apt-get install wiringpi
sudo apt-get install i2c-tools
sudo apt-get install libi2c-dev
sudo apt-get install python-smbus

1. cd /boot
2. nano config.txt

3. sudo reboot

run the demo:
code : arducam_ov2640_capture.c
sudo ./ov2640_capture -c test.jpg 320×240
code: arducam_ov2640_4cams_capture.c
sudo ./ov2640_4cams_capture -c test1,jpg test2.jpg test3.jpg test4.jpg 320×240
code: arducam_ov5642_capture.c
sudo ./ov5642_capture -c test.jpg 320×240
code: arducam_ov5642_4cams_capture.c
sudo ./ov5642_4cams_capture -c test1,jpg test2.jpg test3.jpg test4.jpg 320×240

The GotchaCAM Portable DIY Wifi Camera Based Travel and Home Security and Surveillance System



The GotchaCAM Portable Travel and Home Security and Surveillance System consists of the ArduCAM CC3200 Uno and the software from the book “Home Security System DIY PRO using Android and TI CC3200 SimpleLink” by Robert Chin. Both are available
for purchase on major sites like Amazon in US.

The recommended way to purchase the hardware for this system is by buying the “ArduCAM CC3200 UNO DIY Wifi Portable Security Spy Ghost Hunter Camera Starter Kit” that is available on Amazon. This provides you with all the hardware you will need.

This system is designed for

  •  Makers
  •  TI CC3200 Simplelink enthusiasts
  •  DIY (Do it Yourself) home security enthusiasts
  •  Frequent flyers that stay in hotels or motels.
  •  Landlords that are renting out homes or apartments.

Key Features

  •  Full source code and binaries are available for download and its installation, use, and design is fully explained in the book “Home Security System DIY PRO using Android and TI CC3200 SimpleLink”
  •  Portable design only requires an ArduCAM CC3200 Uno, a MT9D111 digital camera, and an Android cell phone in order to send emergency text alerts and cell phone calls.
  •  No external Wifi network is required to send text messages and emergency calls so this would be great solution for business travelers using hotels or for homes or apartments that are rentals.
  •  Provides portable self-monitored on demand security and surveillance without the contracts or hassle of installing a traditional security system.

Video Demonstration

8MP Sony IMX219 Camera for Raspberry Pi



ArduCAM team just released a 8MP Raspberry Pi compatible camera based on the same Sony IMX219 image sensor. It’s capable of 3280 x 2464 pixel static images, and also supports 1080p30, 720p60 and 640x480p90 video. It attaches to Pi by the dedicated standard CSi interface.

It is the supplementary for Raspberry Pi offical camera in order to fulfill the demands for different lens mount, field of view (FOV) and depth of the field (DOF) as well as the motorized IR cut filter for both daylight and night vision. Contact us for further customization.


  • Sensor type: Sony IMX219 Color CMOS 8-megapixel
  • Sensor size: 3.674 x 2.760 mm (1/4″ format)
  • Pixel Count: 3280 x 2464 (active pixels) 3296 x 2512 (total pixels)
  • Pixel Size: 1.12 x 1.12 um
  • Lens: M12/CS mount customizable, telephoto to fisheye
  • Angle of View: customizable
  • Video: 1280×720 binned and cropped up to 60fps
  • 1080P cropped up to 30fps
  • 1640×1232 full FOV binned mode, up to 30fps
  • 3280×2464 full FOV, allegedly 0.1fps to 15fps
  • Board size: 36 x 36 mm
  • IR Sensitive: Optional motorized IR cut filter

ArduCAM porting for Raspberry Pi


As ArduCAM is general purpose camera, it can be used on any micro controller platform not limited to Arduino, and now ArduCAM team port the code library to Raspberry Pi family.

Thanks to the uniform 40 pin GPIO header design makes it possible to adopt ArduCAM and its mutli camera adapter board for Pi B+, Pi 2, Pi 3 and even Pi ZERO. Due to the benefit of onboard frame buffer and DMA transfer directly from sensor to frame buffer, make the ArduCAM outstanding of taking photos simultaneously.

With ArduCAM porting for Raspberry pi, you can use more cameras on Raspberry Pi together with native Raspberry Pi camera.


Arduino Panorama Photography with ArduCAM


Panoramic photograph is a technique of photography, using specialized equipment or software, that captures images with elongated fields of view. It is sometimes known as wide format photography. In order to create panorama photos, you have to take several photos from different view point and stitching them afterwards. There are basically two ways to get these photos, one is to use one camera and shooting from different position, the other is to use multiple cameras and shooting at the same time. The later has better stitching result than the former and requires less photography experience, but more complex hardware equipment.

With the hardware nature of ArduCAM shields especially the ArduCAM-mini and Multi-Adapter board for Raspberry, you can connect multiple cameras to a single Arduino or Raspberry Pi board, even shoot the cameras at the same time. In this demonstration we will use 4 ArduCAM mini 5MP with its adapter board and an Arduino UNO R3 board to create your own panoramas or virtual tours.










In order to get the maxim field of view, we need to mount fisheye lens into the ArduCAM. The lens parameters like optical format, focal length, FOV is very important for stitching software, you can get these information from your lens suppliers. Here is the lens LS-30180 fisheye specification used in this demo, maybe we can use much better fisheye lens to get better photos.








By connecting 4 ArduCAM mini 5MP with the adapter board and the Arduino board, also inserting a microSD/TF into the bottom side of the adapter board card.










Now you can download ready to use Arduino example sketch for multi-camera setups. The example ArduCAM_Mini_5MP_4Cams_TimeElapse2SD_LowPower.ino will start to initialize 4 cameras and the SD card first, and then take 4 photos at every 5 seconds automatically.

Export the captured photo into your computer, select the photo sets you would like to stitch with KRPano, Pano2VR, Kolor Panotour & Panotour Pro, Flash Panorama Player & Flashificator, PTGui, Saladoplayer & similar apps and post them to panoramas hosted on sites,,,, etc.


ArduCAM now Supports ESP8266 Arduino Board with WIFI Websocket Camera Demo


It is good news to hear that the Arduino IDE support was announced on the ESP8266 community forum, the source code can be found from . It is more than another Arduino board, but can be thought as a Arduino combined with a WIFI shield. With faster CPU speed and much smaller form of factor, most important the less than $10USD price is more attractive, you are worth to try although there are also some limitations. Setup is fairly simple with downloads for Linux, OS X, and Windows. More detail setup can be found from adafruit guide.

Now ArduCAM ports our camera libraries for ESP8266, you can use the ESP8266 module with ArduCAM modules to take high quality high resolution photos and save to SD card, or even to publish the photos to webpage. In this tutorial we will use ESP8266 arduino board to take photos and publish to webpage.

Websocket Background

In order to transfer a photo to webpage, I have to briefly introduce the technology of websocket first. WebSocket is a protocol providing full-duplex communication channels over a single TCP connection. It is designed to be implemented in web browsers and web servers, so it can be used by any client and any platform like PCs, laptops, pads and smart phones. The standard HTTP protocol which is C/S based architecture, a client send a request to a server, the server send the information requested back to the client and close connection immediately. Unlike the standard HTTP protocol, the websocket protocol only use HTTP protocol for handshake stage, and keep the connection open afterward. It allows bi-directional conversation between a browser and the server. Detail websocket description can be found from wiki.

In this demo, we create a websocket server on the ESP8266 arduino borad. It connects to a user defined WIFI router by DHCP, then you can connect to this server via your web browser.

Demo Prerequisite

To complete this demo you need two items:

Hardware connection

The connection between the ESP8266 board and ArduCAM mini is shown as the following picture and table.









Arduino Sketches and library

Before running the demo sketch, you need to copy three libraries ArduCAM, UTFT4ArduCAM_SPI and ESP8266-Websocket to the Arduino libraries folder.

Open the demo sketch ArduCAM_Mini_OV2640_websocket_server.ino, change the following line according to your own wifi AP router, then upload.

const char* ssid = "your_ssid";
const char* password = "your_passpwd";

ESP8266_sketch ESP8266_upload















The assigned IP address can be determined via serial monitor message.















Provide you now have the IP address for websocket server, and open the camera_demo.html located in your Arduino\arduino-1.6.5-r5\libraries\ArduCAM\examples\ESP8266\ArduCAM_Mini_OV2640_websocket_server\html folder from your web browser. Change the websocket IP address get from the serial monitor marked in red box in the picture.

ESP8266_webpageClick the “Connect” button, you will see the websocket connection request from the serial monitor. After few seconds, the webpage will notify the successful connection established.


After that you can click the send button to send a websocket message to ESP8266. It will trigger the capture command on the ESP8266 arduino side, and it will send back the captured image and display on the webpage.


ArduCAM Now Support Rasbperry Beaglebone Black STM32 and More


ArduCAM team now are working on different famous open hardware platform, and successfully port the ArduCAM library to Raspberry Pi, Beaglebone Black and STM32 boards. Also we moved our library to github for better maintenance.

New Low Cost OV5647 Mini Camera Module for Raspberry Pi Now Available


  • Introduction

In order to meet the increasing need of Raspberry Pi compatible camera modules. The ArduCAM team now released ultra low cost add-on mini camera module for Raspberry Pi series boards which is fully compatible with official one. Continue reading “New Low Cost OV5647 Mini Camera Module for Raspberry Pi Now Available” »

New Spy Camera for Raspberry Pi


  • Introduction

In order to meet the increasing need of Raspberry Pi compatible camera modules. The ArduCAM team now released another add-on spy camera module for Raspberry Pi series boards which is fully compatible with official one.

The board itself is tiny, at around 300mm x 16mm. The neck width of the camera module is 6mm, this highlight making it perfect for endoscope, spy surveillance or other applications where size and image quality are important. Continue reading “New Spy Camera for Raspberry Pi” »

Rev.C OV5647 Camera for Raspberry Pi Improves the Optical Performance


  • Introduction

In order to meet the increasing need of Raspberry Pi compatible camera modules. The ArduCAM team now released a revision C add-on camera module for Raspberry Pi which is fully compatible with official one. It optimizes the optical performance than the previous Pi cameras, and give user a much clear and sharp image. Also it provides the FREX and STROBE signals which can be used for multi-camera synchronize capture with proper camera driver firmware. Continue reading “Rev.C OV5647 Camera for Raspberry Pi Improves the Optical Performance” »