Problem with code/libraries for connecting OV0706 camera to arduino

Hi All,
I think this is the right place to post. I am currently trying to set up an VC0706 camera with my arduino, like in the setup on this webpage: VC0706 Camera Module DIY Guide - Blog
However when I run the code I get this error when compiling

C:\Users\Thomas\Documents\Arduino\libraries\camera_VC0706\camera_VC0706.cpp:63:9: error: prototype for 'uint8_t camera_VC0706::setMotionStatus(uint8_t, uint8_t, uint8_t)' does not match any in class 'camera_VC0706'

uint8_t camera_VC0706:: setMotionStatus(uint8_t x, uint8_t d1, uint8_t d2) {

^

In file included from C:\Users\Thomas\Documents\Arduino\libraries\camera_VC0706\camera_VC0706.cpp:10:0:

C:\Users\Thomas\Documents\Arduino\libraries\camera_VC0706\camera_VC0706.h:78:11: error: candidate is: boolean camera_VC0706::setMotionStatus(uint8_t, uint8_t, uint8_t)

boolean setMotionStatus(uint8_t x, uint8_t d1, uint8_t d2);

^

exit status 1
Error compiling for board Arduino/Genuino Uno.

The code im using I have taken from the site previously mentioned and is like this:

#include <camera_VC0706.h>
#include <SD.h>
#include <SoftwareSerial.h>

#define chipSelect 10
#if ARDUINO >= 100
SoftwareSerial cameraconnection = SoftwareSerial(2, 3);
#else
NewSoftSerial cameraconnection = NewSoftSerial(2, 3);
#endif
camera_VC0706 cam = camera_VC0706(&cameraconnection);
void setup() {

#if !defined(SOFTWARE_SPI)
#if defined(AVR_ATmega1280) || defined(AVR_ATmega2560)
if(chipSelect != 53) pinMode(53, OUTPUT); // SS on Mega
#else
if(chipSelect != 10) pinMode(10, OUTPUT); // SS on Uno, etc.
#endif
#endif

pinMode(7,INPUT_PULLUP);
Serial.begin(9600);
Serial.println("VC0706 Camera test");

//SD卡检测
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
return;
}

// 查询摄像头
if (cam.begin()) {
Serial.println("Camera Found:");
} else {
Serial.println("No camera found?");
return;
}
// 摄像头版本号
char *reply = cam.getVersion();
if (reply == 0) {
Serial.print("Failed to get version");
} else {
Serial.println("-----------------");
Serial.print(reply);
Serial.println("-----------------");
}

// 选择合适的图片尺寸 640x480, 320x240 or 160x120
// 图片越大,传输速度越慢
cam.setImageSize(VC0706_640x480);
//cam.setImageSize(VC0706_320x240);
//cam.setImageSize(VC0706_160x120);

uint8_t imgsize = cam.getImageSize();
Serial.print("Image size: ");
if (imgsize == VC0706_640x480) Serial.println("640x480");
if (imgsize == VC0706_320x240) Serial.println("320x240");
if (imgsize == VC0706_160x120) Serial.println("160x120");

Serial.println("Get ready !");

}

void loop() {

if(digitalRead(7)== 0) { //按键检测
delay(10);
if(digitalRead(7)== 0) {
if (! cam.takePicture())
Serial.println("Failed to snap!");
else
Serial.println("Picture taken!");
char filename[13];
strcpy(filename, "IMAGE00.JPG");
for (int i = 0; i < 100; i++) {
filename[5] = '0' + i/10;
filename[6] = '0' + i%10;
// create if does not exist, do not open existing, write, sync after write
if (! SD.exists(filename)) {
break;
}
}
File imgFile = SD.open(filename, FILE_WRITE);
uint16_t jpglen = cam.frameLength();
Serial.print(jpglen, DEC);
Serial.println(" byte image");

Serial.print("Writing image to ");
Serial.print(filename);

while (jpglen > 0) {
// 一次读取32bytes
uint8_t *buffer;
uint8_t bytesToRead = min(32, jpglen); // 调节一次性读取数据大小,从32-64byte ,过大容易不工作
buffer = cam.readPicture(bytesToRead);
imgFile.write(buffer, bytesToRead);
jpglen -= bytesToRead;
}
imgFile.close();
Serial.println("...Done!");
cam.resumeVideo();
}
}
}

Have Continued with what libraries I am using in next post....

......(continued from problem above) The Libraries I am using which I downloaded (and to which the error refer) are these:
camera_VC0706.h :

/***************************************************
This is a library for the openjumper TTL JPEG Camera (VC0706 chipset)

****************************************************/

#if ARDUINO >= 100
#include "Arduino.h"
#include "SoftwareSerial.h"
#else
#include "WProgram.h"
#include "NewSoftSerial.h"
#endif

#define VC0706_RESET 0x26
#define VC0706_GEN_VERSION 0x11
#define VC0706_READ_FBUF 0x32
#define VC0706_GET_FBUF_LEN 0x34
#define VC0706_FBUF_CTRL 0x36
#define VC0706_DOWNSIZE_CTRL 0x54
#define VC0706_DOWNSIZE_STATUS 0x55
#define VC0706_READ_DATA 0x30
#define VC0706_WRITE_DATA 0x31
#define VC0706_COMM_MOTION_CTRL 0x37
#define VC0706_COMM_MOTION_STATUS 0x38
#define VC0706_COMM_MOTION_DETECTED 0x39
#define VC0706_MOTION_CTRL 0x42
#define VC0706_MOTION_STATUS 0x43
#define VC0706_TVOUT_CTRL 0x44
#define VC0706_OSD_ADD_CHAR 0x45

#define VC0706_STOPCURRENTFRAME 0x0
#define VC0706_STOPNEXTFRAME 0x1
#define VC0706_RESUMEFRAME 0x3
#define VC0706_STEPFRAME 0x2

#define VC0706_640x480 0x00
#define VC0706_320x240 0x11
#define VC0706_160x120 0x22

#define VC0706_MOTIONCONTROL 0x0
#define VC0706_UARTMOTION 0x01
#define VC0706_ACTIVATEMOTION 0x01

#define VC0706_SET_ZOOM 0x52
#define VC0706_GET_ZOOM 0x53

#define CAMERABUFFSIZ 100
#define CAMERADELAY 10

class camera_VC0706 {
public:
#if ARDUINO >= 100
camera_VC0706(SoftwareSerial *ser); // Constructor when using SoftwareSerial
#else
camera_VC0706(NewSoftSerial *ser); // Constructor when using NewSoftSerial
#endif
camera_VC0706(HardwareSerial *ser); // Constructor when using HardwareSerial
boolean begin(uint16_t baud = 38400);
boolean reset(void);
boolean TVon(void);
boolean TVoff(void);
boolean takePicture(void);
uint8_t *readPicture(uint8_t n);
boolean resumeVideo(void);
uint32_t frameLength(void);
char *getVersion(void);
uint8_t available();
uint8_t getDownsize(void);
boolean setDownsize(uint8_t);
uint8_t getImageSize();
boolean setImageSize(uint8_t);
boolean getMotionDetect();
uint8_t getMotionStatus(uint8_t);
boolean motionDetected();
boolean setMotionDetect(boolean f);
boolean setMotionStatus(uint8_t x, uint8_t d1, uint8_t d2);
boolean cameraFrameBuffCtrl(uint8_t command);
uint8_t getCompression();
boolean setCompression(uint8_t c);

boolean getPTZ(uint16_t &w, uint16_t &h, uint16_t &wz, uint16_t &hz, uint16_t &pan, uint16_t &tilt);
boolean setPTZ(uint16_t wz, uint16_t hz, uint16_t pan, uint16_t tilt);

void OSD(uint8_t x, uint8_t y, char *s); // isnt supported by the chip :frowning:

private:
uint8_t serialNum;
uint8_t camerabuff[CAMERABUFFSIZ+1];
uint8_t bufferLen;
uint16_t frameptr;
#if ARDUINO >= 100
SoftwareSerial *swSerial;
#else
NewSoftSerial *swSerial;
#endif
HardwareSerial *hwSerial;

void common_init(void);
boolean runCommand(uint8_t cmd, uint8_t args[], uint8_t argn, uint8_t resp, boolean flushflag = true);
void sendCommand(uint8_t cmd, uint8_t args[], uint8_t argn);
uint8_t readResponse(uint8_t numbytes, uint8_t timeout);
boolean verifyResponse(uint8_t command);
void printBuff(void);
};

Final library shall be added in next post....

camera_VC0706.cpp:

/***************************************************
This is a library for the openjumper TTL JPEG Camera (VC0706 chipset)

These displays use Serial to communicate, 2 pins are required to interface

****************************************************/

#include "camera_VC0706.h"

void camera_VC0706::common_init(void) {
swSerial = NULL;
hwSerial = NULL;
frameptr = 0;
bufferLen = 0;
serialNum = 0;
}

// Constructor when using SoftwareSerial or NewSoftSerial
#if ARDUINO >= 100
camera_VC0706::camera_VC0706(SoftwareSerial *ser) {
#else
camera_VC0706::camera_VC0706(NewSoftSerial *ser) {
#endif
common_init(); // Set everything to common state, then...
swSerial = ser; // ...override swSerial with value passed.
}

// ç¡¬ä»¶ä¸²å£æž„é€ å‡½æ•°
camera_VC0706::camera_VC0706(HardwareSerial *ser) {
common_init(); // Set everything to common state, then...
hwSerial = ser; // ...override hwSerial with value passed.
}

// 初始化摄像头,通信波特率
boolean camera_VC0706::begin(uint16_t baud) {
if(swSerial) swSerial->begin(baud);
else hwSerial->begin(baud);
return reset();
}

//复位
boolean camera_VC0706::reset() {
uint8_t args[] = {0x0};

return runCommand(VC0706_RESET, args, 1, 5);
}

//动作检测
boolean camera_VC0706::motionDetected() {
if (readResponse(4, 200) != 4) {
return false;
}
if (! verifyResponse(VC0706_COMM_MOTION_DETECTED))
return false;

return true;
}

//设置动作状态
uint8_t camera_VC0706:: setMotionStatus(uint8_t x, uint8_t d1, uint8_t d2) {
uint8_t args[] = {0x03, x, d1, d2};

return runCommand(VC0706_MOTION_CTRL, args, sizeof(args), 5);
}

//获取动作状态
uint8_t camera_VC0706::getMotionStatus(uint8_t x) {
uint8_t args[] = {0x01, x};

return runCommand(VC0706_MOTION_STATUS, args, sizeof(args), 5);
}

//打开动作检测
boolean camera_VC0706::setMotionDetect(boolean flag) {
if (! setMotionStatus(VC0706_MOTIONCONTROL,
VC0706_UARTMOTION, VC0706_ACTIVATEMOTION))
return false;

uint8_t args[] = {0x01, flag};

runCommand(VC0706_COMM_MOTION_CTRL, args, sizeof(args), 5);
}

//获取检测状态
boolean camera_VC0706::getMotionDetect(void) {
uint8_t args[] = {0x0};

if (! runCommand(VC0706_COMM_MOTION_STATUS, args, 1, 6))
return false;

return camerabuff[5];
}

//获取图片大小
uint8_t camera_VC0706::getImageSize() {
uint8_t args[] = {0x4, 0x4, 0x1, 0x00, 0x19};
if (! runCommand(VC0706_READ_DATA, args, sizeof(args), 6))
return -1;

return camerabuff[5];
}

//设置图片尺寸
boolean camera_VC0706::setImageSize(uint8_t x) {
uint8_t args[] = {0x05, 0x04, 0x01, 0x00, 0x19, x};

return runCommand(VC0706_WRITE_DATA, args, sizeof(args), 5);
}

/****************** downsize image control */

uint8_t camera_VC0706::getDownsize(void) {
uint8_t args[] = {0x0};
if (! runCommand(VC0706_DOWNSIZE_STATUS, args, 1, 6))
return -1;

return camerabuff[5];
}

boolean camera_VC0706::setDownsize(uint8_t newsize) {
uint8_t args[] = {0x01, newsize};

return runCommand(VC0706_DOWNSIZE_CTRL, args, 2, 5);
}

/***************** other high level commands */
//摄像头版本
char * camera_VC0706::getVersion(void) {
uint8_t args[] = {0x01};

sendCommand(VC0706_GEN_VERSION, args, 1);
// get reply
if (!readResponse(CAMERABUFFSIZ, 200))
return 0;
camerabuff[bufferLen] = 0; // end it!
return (char *)camerabuff; // return it!
}

........ to be continued

........ to be continued

NO!

Read the stickies at the top of the forum, and learn to post code correctly!