Page 1 of 1

sdiCameraControl methods not working with 3g-sdi shield

PostPosted: Thu Mar 28, 2019 2:22 pm
by Louis Bonduel
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 ?

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

PostPosted: Sat Mar 30, 2019 11:40 am
by Xtreemtec
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. ;)

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

PostPosted: Tue Apr 02, 2019 6:30 pm
by Louis Bonduel
Ok thank's a lot, I didn't know about that, I guess my problems are fixed then ;)