Installing Arducam C/C++ SDK

From wiki.ferrari.mo.it
Jump to navigation Jump to search

Installing Arducam C/C++ SDK on NanoPI Neo

This test was run on a Nanopi Neo, Arducam USB2.0 Rev.C and OV5642 camera. A simple test on Windows 7 can be done following the instructions on

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=2ahUKEwjL9ZGkydbfAhXEDOwKHYIpAdMQFjAAegQIABAC&url=http%3A%2F%2Fwww.arducam.com%2Fdownloads%2Fshields%2FUSB_Shield%2FUSB3%2FArduCAM_USB_Camera_SDK_Guide.pdf&usg=AOvVaw3weNXgOPIZBjA_5LxWwJm2

1) Create swap space, otherwise if you don't have at least 1GB of RAM the compiler will crash.

free
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free

2) Install libusb1.0-0-dev

apt-get install libusb1.0-0-dev

3) Download Arducam SDK from github:

https://github.com/ArduCAM/ArduCAM_USB_Camera_Shield

then put it in a directory of your choice

4) Go to the Raspberry PI directory (NanoPI has the same ARM architecture), and

- install Arducam SDK

cd /root/ArduCAM_USB_Camera_Shield-master/RaspberryPi/Cpp/Streaming_demo
export LD_LIBRARY_PATH=./Arducam_SDK
make install-sdk
mv ArduCam_Demo ArduCam_Demo.orig
make

It will compile. Then, make a check.

./ArduCam_Demo ../../../cpp_config/OV5642_JPEG_QSXGA.yml

Here is the output:

device num:1
index:   0      Serial:▒▒▒▒-▒▒▒▒-▒▒▒▒
Serial: ▒▒▒▒-▒▒▒▒-▒▒▒▒
capture thread create successfully.
read thread create successfully.
Capture began, rtn_val = 0
(ArduCam:8149): Gtk-WARNING **: cannot open display:

The executable will get an error due to the lack of graphic interface, but the camera is recognized.