#ifndef cameraDefinitions_h #define cameraDefinitions_h #include "Arduino.h" #define SYNC_COUNTER_MIN 25 #define SYNC_COUNTER_MAX 60 #define LUMINANCE_DELAY 2000 //milliseconds #define MAX_IDLE_TIME 15000 #define UPDATE_TIME 10000 #define COMMAND_LENGTH 6 #define BAUDRATE 57600 #define IMAGE_SIZE 4800 // bytes #define SYNC_COUNTER_MIN 25 #define SYNC_COUNTER_MAX 60 #define LUMINANCE_DELAY 2000 //milliseconds #define MAX_IDLE_TIME 15000 #define UPDATE_TIME 10000 #define COMMAND_LENGTH 6 #define BAUDRATE 57600 //uCam II commands const byte CMD_ID_SYNC=0x0D; const byte CMD_ID_INITIAL=0x01; const byte CMD_ID_GET_PICTURE=0x04; const byte CMD_ID_SNAPSHOT=0x05; const byte CMD_ID_RESET=0x08; const byte CMD_ID_ACK=0x0E; const byte CMD_ID_NAK=0x0F; const byte CMD_ID_DATA=0x0A; const byte CMD_ID_START=0xAA; const byte NO_DATA=0x00; const byte MISC_DATA = 0xFF; const byte FULL_RESET=0x00; const byte GET_PICTURE_RAW=0x02; const byte SNAPSHOT_JPG=0x00; const byte SNAPSHOT_RAW=0x01; const byte SNAPSHOT_NO_SKIP=0x00; const byte INITIAL_FORMAT_GRAY_8BIT=0x03; const byte INITIAL_FORMAT_COLOR_16BIT=0x06; const byte INITIAL_FORMAT_COLOR_JPEG=0x07; const byte INITIAL_RESOLUTION_80x60=0x01; const byte INITIAL_RESOLUTION_160x120=0x03; const byte INITIAL_RESOLUTION_128x128=0x09; const byte INITIAL_RESOLUTION_128x96=0x0B; const byte INITIAL_RESOLUTION_JPEG_160x128=0x03; const byte INITIAL_RESOLUTION_JPEG_320x240=0x05; const byte INITIAL_RESOLUTION_JPEG_640x480=0x07; // Host Command (AA, idNum, para_1, para_2, para_3, para_4) // ACK (AA 0E CommandID ACKcounter packageID_0 packageID_1) // INITIAL (AA 00 imageFormat ACKcounter rawResolution jpegResolution*) *enter 01, 03, 05, or 07 in RAW mode // SNAPSHOT (AA 05 snapshotType skipFrameLow skipFrameHigh 00) // GET_PICTURE (AA 04 pictureType 00 00 00) // SYNC (AA 0D 00 00 00 00) // Commands from Camera // DATA (AA 0A dataType lengthByte_0 lengthByte_1 lengthByte_2) // NAK (AA 0F 00 nakCounter errorCode 00) #endif