thinkyhead

M240 - Trigger Camera

extras Trigger a camera shutter PHOTO_GCODE

Description

Trigger a camera shutter using a digital pin or by bumping a physical switch.

Notes

CHDK_PIN or PHOTOGRAPH_PIN is required prior to Marlin 2.0.0.

To use the CHDK_PIN or PHOTOGRAPH_PIN option with a digital camera see this article.

To use an endstop or contact switch as a shutter switch for your smartphone’s camera, see this video.

Usage

M240 [A<offset>] [B<offset>] [D<ms>] [F<feedrate>] [I<pos>] [J<pos>] [P<ms>] [R<length>] [S<feedrate>] [X<pos>] [Y<pos>] [Z<length>]

Parameters

[A<offset>]
PHOTO_POSITION

Offset to the X return position.

    [B<offset>]
    PHOTO_POSITION

    Offset to the Y return position.

      [D<ms>]
      PHOTO_SWITCH_POSITION PHOTO_SWITCH_MS

      Duration to hold down the shutter switch.

        [F<feedrate>]
        PHOTO_POSITION

        Feedrate for the main photo moves. If omitted, the homing feedrate will be used.

          [I<pos>]
          PHOTO_SWITCH_POSITION

          Shutter switch X position. If omitted, the photo move X position applies.

            [J<pos>]
            PHOTO_SWITCH_POSITION

            Shutter switch Y position. If omitted, the photo move Y position applies.

              [P<ms>]
              PHOTO_SWITCH_POSITION PHOTO_SWITCH_MS

              Delay after pressing the shutter switch.

                [R<length>]
                PHOTO_POSITION

                Retract/recover length.

                  [S<feedrate>]
                  PHOTO_POSITION

                  Retract/recover feedrate.

                    [X<pos>]
                    PHOTO_POSITION

                    Main photo move X position.

                      [Y<pos>]
                      PHOTO_POSITION

                      Main photo move Y position.

                        [Z<length>]
                        PHOTO_POSITION

                        Main photo move Z raise.

                          Related Media