Exposure Control Code Samplesļƒ

  1. Import the interface. This line is automatically added by OnBot Java when the interface is used (coded).

  • import org.firstinspires.ftc.robotcore.external.hardware.camera.controls.ExposureControl;

  1. Declare the ExposureControl object, before runOpMode().

  • ExposureControl myExposureControl;

  1. Assign the Vuforia/TFOD video stream control to your control object, in runOpMode().

  • myExposureControl = vuforia.getCamera().getControl(ExposureControl.class);

  1. Set the mode to Manual, for direct control.

  • myExposureControl.setMode(ExposureControl.Mode.Manual);

  1. Set the exposure duration, in this case to 30 milliseconds.

  • myExposureControl.setExposure(30, TimeUnit.MILLISECONDS);

See far below for these and other exposure controls illustrated in Sample OpModes.