siehe auch: (evtl. Links zu anderen verwandten Seiten einfügen...) <> = CamCtrl = The CamCtrl has an I2C data bus. {{http://gallery3.mikrokopter.de/var/resizes/tech/CamCtrl_Connector.gif?m=1452852162}} = Protocol = * Slave Address: 0x26 * 4 Bytes command to the unit * 11 Bytes from the unit = Defines = == FromCamCtrl.CamStatus == {{{#!cplusplus // FromCamCtrl.CamStatus #define CAM_STATE_RDY 0x80 // The camera seems to be ready #define CAM_STATE_REC_ACTIVE 0x40 // Recording Video #define CAM_STATE_PHOTO_MODE 0x20 // Camera is in Photo Mode #define CAM_STATE_OFF 0x10 // Camera off but connected #define CAM_STATE_CAM_DISCONN 0x08 // Camera is not connected #define CAM_STATE_I2C_OK 0x04 // Cam_Ctrl is connected by I2C (set by NC) #define CAM_STATE_ZOOM 0x02 // Zoom active #define CAM_STATE_PIC_CAPTURED 0x01 // Bit for captured one Photo recently }}} == ToCamCtrl.CamCommand == {{{#!cplusplus // ToCamCtrl.CamCommand #define CAM_CMD_SWITCH_ON 0x80 #define CAM_CMD_SWITCH_OFF 0x40 #define CAM_CMD_REC_ON 0x20 #define CAM_CMD_REC_OFF 0x10 #define CAM_CMD_SHUTTER 0x08 #define CAM_CMD_RESET_CAM 0x02 }}} == FromCamCtrl.Type == {{{#!cplusplus //FromCamCtrl.Type #define TYPE_LANC 1 #define TYPE_IR 2 #define TYPE_MULTI 3 }}} = Structures = == Structure FromCamCtrl == {{{#!cplusplus typedef struct { u8 CamStatus; u16 PhotoCount; u8 free1; u8 PPM1Okay; u8 PPM1Data; u8 PPM2Okay; u8 PPM2Data; u8 Type; u8 Version; // 4 = V1.04 104 = V2.04 u8 Compatible; } __attribute__((packed)) FromCamCtrl_t; // note: use 'packed' for 16 or 32-bit processors extern FromCamCtrl_t FromCamCtrl; }}} == Structure ToCamCtrl == {{{#!cplusplus typedef struct { u8 CamCommand; u8 ZoomInput; u8 dummy; // free for further use -> leave zero u8 dummy2; // free for further use -> leave zero } __attribute__((packed)) ToCamCtrl_t; // note: use 'packed' for 16 or 32-bit processors }}} <
> ----