Adafruit VC0760 - Hirokuzu/EECE281_project2 GitHub Wiki
This serves more as a list/order of functions rather than an actual data sheet as the library is poorly documented. Apparently it supports motion with cam.getMotionDetect(), then the cam.motionDetected() flag is triggered (must manually lower). But onto taking pictures:
Requires the following header files:
Adafruit_VC0706.h, SPI.h, SoftwareSerial.h
defines chipSelect 10 used to select the camera chip which is in pin 10 in the example in the library but will probably be different, must be set as output in setup
Then follows the following steps:
SoftwareSerial cameraconnection = SoftwareSerial(2, 3); creates a serial connection between the camera and arduino
Adafruit_VC0706 cam = Adafruit_VC0706(&cameraconnection); initalizes the camera
cam.begin(); starts the camera to start looking and gets it ready to take a pic
cam.setImageSize(VC0706_640x480); sets the image size as the max size the camera can take (320x240 & 160x120 also work)
uint8_t imgsize = cam.getImageSize(); gets the size of the frame (640x480)
cam.takePicture(); actually takes the picture and stores it in an internal buffer in the camera
uint16_t jpglen = cam.frameLength(); gets the size of the image in bytes
cam.readPicture(bytesToRead); reads the picture byte by byte and returns the byte
cam.resumeVideo(); restarts the watching so you can take another photo