0

i am quite new to programming raspberry pi. (though i have used apt-get update and upgrade to install, and i have enabled the SPI mode in the rasp-config)

i have recently purchased the arducam mini 5MP (OV5642)as well as the 2MP(OV2640) version, with the camera shield. i initially used it for my ArduCAM UNO ESP8266 board, however, now i intend to use it for my raspberry pi.

the arduCAM website says that it is compatible with raspberry pi, i think i understand how to plug the SPI pins properly, however, I am unsure of the coding part, as in how to use the library, as well as the platform to code it on, python or ??

i know the library can be found in https://github.com/ArduCAM/RaspberryPi/tree/master/ArduCAM4Pi but i have no idea how to use it.

im using the raspberry pi 2, model B with the breakout board for GPIO. any help or example or sketch would be useful. thank you.

1

Looks like it's just for C (no Python). If it were me playing with it, I'd firstly make sure I had some useful C bits installed then clone the repository:

$ sudo apt-get install build-essential git git-core
$ git clone https://github.com/ArduCAM/RaspberryPi
$ cd RaspberryPi

Next, I'd take a look at the Makefile (always a good starting point) and note that it's got an "all" target at the top which looks like it'll build a whole bunch of capture-test executables:

$ less Makefile

(less is a paging utility which allows you to read a text file and scroll around it; use "q" to exit)

Having noted this, I'd build them and try running an appropriate one:

$ make
$ ./ov5642_capture

Once I'd got that working (looks like it needs some options), I'd dig into the source code to see what makes it tick, starting with the main code for the executable I'd run:

$ nano arducam_ov5642_capture.c

(nano is a basic command line editor - substitute your favourite text editor here)

Finally, I'd note that the only header-file imported from the same directory is "arducam.h" which presumably provides all the "arducam_*" functions, so I'd go take a look at that to see what else is available:

$ nano arducam.h
  • i ran " make ./arducam_ov5642_capture" and quite a few reference errors came out. i have solved the "WiringPi.h" problem by cloning the github of WiringPi.h and installing the library. i have looked around to solve the referncing problem, but i dont know how to solve it. – zhenyuan992 May 27 '16 at 15:56
  • here is the screenshot of my raspberry pi i929.photobucket.com/albums/ad135/mrgreenteaguy/… – zhenyuan992 May 27 '16 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.