sdiCameraControl methods not working with 3g-sdi shield

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Louis Bonduel

  • Posts: 3
  • Joined: Tue Mar 26, 2019 3:43 pm
  • Real Name: Louis Bonduel

sdiCameraControl methods not working with 3g-sdi shield

PostThu Mar 28, 2019 2:22 pm

Hi,
I'm beginning to use the 3g-sdi shield with a micro studio cinema camera and an olympus m.zuiko 7-14mm f/2.8 pro as a lens. I have ran successfully the tally blink test but no other one works. In fact I'm not able to run any of the "sdiCameraControl" methods (focus, zoom, display, etc...). I can compile and upload to the shield, the code will run correctly through the loop, but it seems like those methods don't do anything.

Here is program that should help me having control over zoom and focus with commands lines in the serial monitor. Prints in the serial monitor work, value are changed, but camera won't move :
Code: Select all
#include <BMDSDIControl.h>
#include <stdlib.h>
const int shieldAddress = 0x6E;
BMD_SDICameraControl_I2C sdiCameraControl(shieldAddress);

String inString = "";
boolean error = false;

void setup() {
  sdiCameraControl.begin();
  sdiCameraControl.setOverride(true);
  Serial.begin(9600);
}
void loop() {
  if (Serial.available() > 0) {    // is a character available?
    int inChar = Serial.read();
    error = false;
    //loop();

    if (inChar != '\n') {

      // As long as the incoming byte
      // is not a newline,
      // convert the incoming byte to a char
      // and add it to the string
      inString += (char)inChar;
    }
    else {
      if(inString.substring(0,1) != "f" && inString.substring(0,1) != "z" || inString.substring(0) == "f" || inString.substring(0) == "z") {
          Serial.println("Write 'f<value>' to set focus and 'z<value>' to set zoom");
          error = true;
          //return 0;
        }
        if (inString.substring(1) > "1"){
          Serial.println("Value can't exceed 1.");
          error = true;
        }
        if (inString.substring(1) < "0"){
          Serial.println("Value can't be less than 0.");
          error = true;
        }
      if(inString.substring(0,1) == "f" && error == false){
        Serial.print("Input string: ");
        Serial.print(inString + ".");
        Serial.print("\t Focus value is: ");
        inString.remove(0,1);
        Serial.println(inString);

        sdiCameraControl.writeCommandFixed16(
          4,                   // Destination:    Camera 1
          0,                   // Category:       Lens
          0,                    // Param:          Instantaneous Autofocus;
          0,
          inString.toFloat()
          );
        inString = "";
      }
      if(inString.substring(0,1) == "z" && error == false){
        Serial.print("Input string: ");
        Serial.print(inString + ".");
        Serial.print("\t Zoom value is: ");
        inString.remove(0,1);
        Serial.println(inString);
       
        sdiCameraControl.writeCommandFixed16(
          4,                   // Destination:    Camera 1
          0,                   // Category:       Lens
          8,                    // Param:         Zoom;
          0,
          inString.toFloat()
          );
        inString = "";
      }
     
      // clear the string for new input:
      inString = "";
    }
  }
}


EDIT : I just looked up at the different leds, led 5 (I2C parser busy) lights when I send a command, meaning the shield and arduino do communicates, but, led 6 ( Serial parser busy ) never does, should it?

EDIT 2: I figured it out for the leds and managed to make the focus works, but not the zoom, is it even possible with this lens ?
Offline
User avatar

Xtreemtec

  • Posts: 3835
  • Joined: Wed Jan 02, 2013 11:48 am
  • Location: The Netherlands

Re: sdiCameraControl methods not working with 3g-sdi shield

PostSat Mar 30, 2019 11:40 am

There are only 4 lenses in the world that have motorized zoom on the MFT mount. :lol: I dont have the list here.. But it is somewhere in the manual which lenses are supoorted with Zoom. ;)
Daniel Wittenaar .:: Xtreemtec Media Productions ::. -= www.xtreemtec.nl =-
4K OBV Trailer, ATEM TVS HD, 1M/E 4K, 4M/E Broadcast Studio 4K, Hyperdeck Studio Mini, Ursa Broadcast 4K, 4K fiber converters with Sony Control
Offline

Louis Bonduel

  • Posts: 3
  • Joined: Tue Mar 26, 2019 3:43 pm
  • Real Name: Louis Bonduel

Re: sdiCameraControl methods not working with 3g-sdi shield

PostTue Apr 02, 2019 6:30 pm

Ok thank's a lot, I didn't know about that, I guess my problems are fixed then ;)

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 4 guests