Skip to main content

Basic Usage

The Camera class automatically detects your camera’s brand and uses the appropriate vendor-specific implementation. The example assumes the body advertises those controls and remote capture; camera model, USB mode, and shooting mode can change the available surface. For application UIs, use the shared control model: getCapabilities() exposes current choices across vendors, and shutterSpeed covers exposure duration and shutter angle without implicit mode changes. Multiple USB bodies require an explicit device filter. For a generic or Olympus body, inspect the live standard-property inventory first:
This prevents an application from presenting ISO, aperture, or focus controls solely because it recognizes a vendor name. For example, the physically tested Olympus E-PL5 MTP mode publishes battery and camera date/time but no exposure or remote-capture property.

How It Works

When you call connect(), Darkgrade Slate:
  1. Scans for connected USB devices
  2. Identifies the camera’s vendor ID
  3. Selects the appropriate vendor-specific implementation:
    • Sony ⍺ Series → SonyCamera with live view, video recording, SDIO
    • Nikon Z Series → NikonCamera with extended properties
    • Canon EOS R Series → CanonCamera with remote control
    • Olympus and other PTP cameras → GenericCamera with a capability-driven standard-property inventory
  4. Opens that driver’s session. Read getCapabilities() for current controls and write guards.

Common Examples

Camera Settings

Event Handling

Live View

Capture live view on supported Sony, Nikon or Canon bodies:

Video Recording

Start and stop video recording on supported Sony, Nikon or Canon bodies with usable media:

File Management

List and download files from the camera:

Advanced Property Access

Access vendor-specific properties directly:

Advanced Usage

Typed protocol access

Applications instantiate Camera and use its shared control model. Protocol work can use the existing typed definitions without maintaining an application vendor map:

Manual Configuration

Specify device filters and logging options:

Next Steps