Cameron Nichols wrote:Hi Rolf,
The SDI Camera Control Protocol command to start/stop recording is 10.1 Transport Mode - write to byte [0] with values:
- 2 = Record
- 0 = Preview (stop record)
Regards
Cameron
I am relatively new to programing and I'm working on a project where we want to control record Start and Stop via SDI with the Arduino Shield. I was wondering if you would be willing to look at my code and point me in the right direction? I can't seem to get it to work and I'm not sure what to change.
#include <BMDSDIControl.h>
const int shieldAddress = 0x6E;
BMD_SDICameraControl_I2C sdiCameraControl(shieldAddress);
void setup() {
sdiCameraControl.begin();
sdiCameraControl.setOverride(true);
recordWithManualPacket();
recordWithSimpleCommand();
}
void loop() {
}
void recordWithSimpleCommand() {
sdiCameraControl.writeCommandInt8(
255,
10,
1,
0,
2
);
}
void recordWithManualPacket() {
const byte recordCommand[] = {
/*Header */
255, //Destination: All Cameras
8, //Length: 8 Bytes
0, //Command: Set and update values
0, //Source: Unused
/*Payload */
10, //Category: Media
1, //Parameter: Transport Mode
1, //Type: signed byte
0, //Operation: Assign Value
2, //Mode: Record
+1, //Speed: 1xforward
1<<5, //Flags: disk1 active
0, //Active Storage Medium: CFast Card
/*Padding */
};
sdiCameraControl.write(recordCommand);
}
Thank you for your time and patience!
Jason