In this demonstration we introduce how to use ArduCAM shield on Arduino Yun board. And view captured photos remotely via WIFI connection.
To complete this demonstration, you need the following items:
- Arduino Yun board
- ArduCAM Rev.C shield
- OV2640 camera module
- A Micro SD/TF card
- Long pin single row female socket
Also you need the following software packages:
- ArduCAM library
- Arduino IDE 1.5.8 BETA
Due to the over height of Arduino Yun USB connector, the ArduCAM can not mate with Yun like other Arduino boards. So you need extra long pin single row female socket to raise the ArduCAM. You need few 6pin, 8pin and 10pin female sockets and break it like the picture shown. Stack up the sockets on the ArduCAM pin header like this.
Next plug the ArduCAM shield on top of the Arduino Yun board.
Finally plug in the OV2640 camera module to the camera socket and plug in micro SD/TF card on the ArduCAM shield. Note that the camera has four extra pins, so you need to align the pin on the left.
According to the requirement of ArduinoBridge library, you need to creat a “arduino” directory in the root directory of the micro SD/TF card, in this case the Arduino Yun can recognize the card.
Download the latest ArduCAM library from the link http://www.arducam.com/download.
Extra the files and copy the UTFT4ArduCAM_SPI and ArduCAM directories to the directory of Arduino/libraries where you have installed the Arduino IDE.
Open the File->Examples->ArduCAM->ArduCAM_Yun_OV2640_Digital_Camera example sketch. By select the proper Board type and correct the Port number, then press Upload button to upload the sketch to the Arduino Yun board.
After upload the sketch, you can see the LCD screen refresh from white to black and display the preview video on the screen. Wait for few minutes for the Arduino Yun booting up, you can find a WIFI connection named Arduino Yun-XXXXXXXX on your computer. Please view the guide to link with the Yun board ArduinoYun Guide.
After you successfully connect your host PC to Arduino Yun board, you can use SSH tools SmarTTY to login the command line on the Yun board.
Typing command below to add symbolic link to the directory DCIM in the microSD/TF card.
ln -s /mnt/sda1/DCIM /www/DCIM
Press the shutter button on the ArduCAM shield to take several photos. Then open the Arduino Yun webserver link http://192.168.240.1/DCIM to check the photos just taken.