Browse Source

Add PHOTO_GCODE option, photo trigger physical move (#13168)

Scott Lahteine 5 years ago
parent
commit
d2bdb71c13
No account linked to committer's email address
100 changed files with 1014 additions and 439 deletions
  1. 0
    4
      Marlin/Configuration.h
  2. 23
    5
      Marlin/Configuration_adv.h
  3. 2
    3
      Marlin/src/Marlin.cpp
  4. 0
    4
      Marlin/src/config/default/Configuration.h
  5. 23
    5
      Marlin/src/config/default/Configuration_adv.h
  6. 0
    4
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h
  7. 23
    5
      Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  8. 0
    4
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h
  9. 23
    5
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  10. 0
    4
      Marlin/src/config/examples/AliExpress/CL-260/Configuration.h
  11. 0
    4
      Marlin/src/config/examples/Anet/A2/Configuration.h
  12. 23
    5
      Marlin/src/config/examples/Anet/A2/Configuration_adv.h
  13. 0
    4
      Marlin/src/config/examples/Anet/A2plus/Configuration.h
  14. 23
    5
      Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h
  15. 0
    4
      Marlin/src/config/examples/Anet/A6/Configuration.h
  16. 23
    5
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  17. 0
    4
      Marlin/src/config/examples/Anet/A8/Configuration.h
  18. 23
    5
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  19. 0
    4
      Marlin/src/config/examples/AnyCubic/i3/Configuration.h
  20. 23
    5
      Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h
  21. 0
    4
      Marlin/src/config/examples/ArmEd/Configuration.h
  22. 23
    5
      Marlin/src/config/examples/ArmEd/Configuration_adv.h
  23. 0
    4
      Marlin/src/config/examples/Azteeg/X5GT/Configuration.h
  24. 0
    4
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h
  25. 23
    5
      Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  26. 0
    4
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h
  27. 23
    5
      Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h
  28. 0
    4
      Marlin/src/config/examples/BQ/Hephestos/Configuration.h
  29. 23
    5
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  30. 0
    4
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h
  31. 23
    5
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  32. 0
    4
      Marlin/src/config/examples/BQ/WITBOX/Configuration.h
  33. 23
    5
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  34. 0
    4
      Marlin/src/config/examples/Cartesio/Configuration.h
  35. 23
    5
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  36. 0
    4
      Marlin/src/config/examples/Creality/CR-10/Configuration.h
  37. 23
    5
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  38. 0
    4
      Marlin/src/config/examples/Creality/CR-10S/Configuration.h
  39. 23
    5
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  40. 0
    4
      Marlin/src/config/examples/Creality/CR-10mini/Configuration.h
  41. 23
    5
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  42. 0
    4
      Marlin/src/config/examples/Creality/CR-8/Configuration.h
  43. 23
    5
      Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h
  44. 0
    4
      Marlin/src/config/examples/Creality/Ender-2/Configuration.h
  45. 23
    5
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  46. 0
    4
      Marlin/src/config/examples/Creality/Ender-3/Configuration.h
  47. 23
    5
      Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h
  48. 0
    4
      Marlin/src/config/examples/Creality/Ender-4/Configuration.h
  49. 23
    5
      Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h
  50. 0
    4
      Marlin/src/config/examples/Einstart-S/Configuration.h
  51. 23
    5
      Marlin/src/config/examples/Einstart-S/Configuration_adv.h
  52. 0
    4
      Marlin/src/config/examples/Felix/Configuration.h
  53. 23
    5
      Marlin/src/config/examples/Felix/Configuration_adv.h
  54. 0
    4
      Marlin/src/config/examples/Felix/DUAL/Configuration.h
  55. 0
    4
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h
  56. 23
    5
      Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h
  57. 0
    4
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h
  58. 23
    5
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  59. 0
    4
      Marlin/src/config/examples/Formbot/Raptor/Configuration.h
  60. 23
    5
      Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h
  61. 0
    4
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h
  62. 23
    5
      Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  63. 0
    4
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h
  64. 23
    5
      Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h
  65. 0
    4
      Marlin/src/config/examples/Geeetech/A10M/Configuration.h
  66. 23
    5
      Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h
  67. 0
    4
      Marlin/src/config/examples/Geeetech/A20M/Configuration.h
  68. 23
    5
      Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h
  69. 0
    4
      Marlin/src/config/examples/Geeetech/GT2560/Configuration.h
  70. 0
    4
      Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h
  71. 0
    4
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h
  72. 23
    5
      Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h
  73. 0
    4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h
  74. 0
    4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h
  75. 0
    4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h
  76. 23
    5
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  77. 0
    4
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h
  78. 23
    5
      Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  79. 0
    4
      Marlin/src/config/examples/Infitary/i3-M508/Configuration.h
  80. 23
    5
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  81. 0
    4
      Marlin/src/config/examples/JGAurora/A5/Configuration.h
  82. 23
    5
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  83. 0
    4
      Marlin/src/config/examples/MakerParts/Configuration.h
  84. 23
    5
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  85. 0
    4
      Marlin/src/config/examples/Malyan/M150/Configuration.h
  86. 23
    5
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  87. 0
    4
      Marlin/src/config/examples/Malyan/M200/Configuration.h
  88. 23
    5
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  89. 0
    4
      Marlin/src/config/examples/Micromake/C1/basic/Configuration.h
  90. 0
    4
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h
  91. 23
    5
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  92. 0
    4
      Marlin/src/config/examples/Mks/Robin/Configuration.h
  93. 23
    5
      Marlin/src/config/examples/Mks/Robin/Configuration_adv.h
  94. 0
    4
      Marlin/src/config/examples/Mks/Sbase/Configuration.h
  95. 23
    5
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  96. 0
    4
      Marlin/src/config/examples/RapideLite/RL200/Configuration.h
  97. 23
    5
      Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h
  98. 0
    4
      Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h
  99. 0
    4
      Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h
  100. 0
    0
      Marlin/src/config/examples/RigidBot/Configuration.h

+ 0
- 4
Marlin/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 2
- 3
Marlin/src/Marlin.cpp View File

@@ -195,7 +195,6 @@ millis_t max_inactive_time, // = 0
195 195
          stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
196 196
 
197 197
 #if PIN_EXISTS(CHDK)
198
-  extern bool chdk_active;
199 198
   extern millis_t chdk_timeout;
200 199
 #endif
201 200
 
@@ -482,8 +481,8 @@ void manage_inactivity(const bool ignore_stepper_queue/*=false*/) {
482 481
   }
483 482
 
484 483
   #if PIN_EXISTS(CHDK) // Check if pin should be set to LOW (after M240 set it HIGH)
485
-    if (chdk_active && ELAPSED(ms, chdk_timeout)) {
486
-      chdk_active = false;
484
+    if (chdk_timeout && ELAPSED(ms, chdk_timeout)) {
485
+      chdk_timeout = 0;
487 486
       WRITE(CHDK_PIN, LOW);
488 487
     }
489 488
   #endif

+ 0
- 4
Marlin/src/config/default/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/default/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration.h View File

@@ -2025,10 +2025,6 @@
2025 2025
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2026 2026
 //#define TEMP_STAT_LEDS
2027 2027
 
2028
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2029
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2030
-//#define PHOTOGRAPH_PIN     23
2031
-
2032 2028
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2033 2029
 //#define SF_ARC_FIX
2034 2030
 

+ 23
- 5
Marlin/src/config/examples/3DFabXYZ/Migbot/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration.h View File

@@ -2014,10 +2014,6 @@
2014 2014
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2015 2015
 //#define TEMP_STAT_LEDS
2016 2016
 
2017
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2018
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2019
-//#define PHOTOGRAPH_PIN     23
2020
-
2021 2017
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2022 2018
 //#define SF_ARC_FIX
2023 2019
 

+ 23
- 5
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/AliExpress/CL-260/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 0
- 4
Marlin/src/config/examples/Anet/A2/Configuration.h View File

@@ -1996,10 +1996,6 @@
1996 1996
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1997 1997
 //#define TEMP_STAT_LEDS
1998 1998
 
1999
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2000
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2001
-//#define PHOTOGRAPH_PIN     23
2002
-
2003 1999
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2004 2000
 //#define SF_ARC_FIX
2005 2001
 

+ 23
- 5
Marlin/src/config/examples/Anet/A2/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Anet/A2plus/Configuration.h View File

@@ -1996,10 +1996,6 @@
1996 1996
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1997 1997
 //#define TEMP_STAT_LEDS
1998 1998
 
1999
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2000
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2001
-//#define PHOTOGRAPH_PIN     23
2002
-
2003 1999
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2004 2000
 //#define SF_ARC_FIX
2005 2001
 

+ 23
- 5
Marlin/src/config/examples/Anet/A2plus/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Anet/A6/Configuration.h View File

@@ -2148,10 +2148,6 @@
2148 2148
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2149 2149
 //#define TEMP_STAT_LEDS
2150 2150
 
2151
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2152
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2153
-//#define PHOTOGRAPH_PIN     23
2154
-
2155 2151
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2156 2152
 //#define SF_ARC_FIX
2157 2153
 

+ 23
- 5
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

@@ -1807,12 +1807,30 @@
1807 1807
 // @section extras
1808 1808
 
1809 1809
 /**
1810
- * Canon Hack Development Kit
1811
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1810
+ * Photo G-code
1811
+ * Add the M240 G-code to take a photo.
1812
+ * The photo can be triggered by a digital pin or a physical movement.
1812 1813
  */
1813
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1814
-#if PIN_EXISTS(CHDK)
1815
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1814
+//#define PHOTO_GCODE
1815
+#if ENABLED(PHOTO_GCODE)
1816
+  // A position to move to (and raise Z) before taking the photo
1817
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1818
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1819
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1820
+
1821
+  // Canon RC-1 or homebrew digital camera trigger
1822
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1823
+  //#define PHOTOGRAPH_PIN 23
1824
+
1825
+  // Canon Hack Development Kit
1826
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1827
+  //#define CHDK_PIN        4
1828
+
1829
+  // Optional second move with delay to trigger the camera shutter
1830
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1831
+
1832
+  // Duration to hold the switch or keep CHDK_PIN high
1833
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1816 1834
 #endif
1817 1835
 
1818 1836
 /**

+ 0
- 4
Marlin/src/config/examples/Anet/A8/Configuration.h View File

@@ -2009,10 +2009,6 @@
2009 2009
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2010 2010
 //#define TEMP_STAT_LEDS
2011 2011
 
2012
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2013
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2014
-//#define PHOTOGRAPH_PIN     23
2015
-
2016 2012
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2017 2013
 //#define SF_ARC_FIX
2018 2014
 

+ 23
- 5
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/AnyCubic/i3/Configuration.h View File

@@ -2004,10 +2004,6 @@
2004 2004
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2005 2005
 //#define TEMP_STAT_LEDS
2006 2006
 
2007
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2008
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2009
-//#define PHOTOGRAPH_PIN     23
2010
-
2011 2007
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2012 2008
 //#define SF_ARC_FIX
2013 2009
 

+ 23
- 5
Marlin/src/config/examples/AnyCubic/i3/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/ArmEd/Configuration.h View File

@@ -1995,10 +1995,6 @@
1995 1995
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1996 1996
 //#define TEMP_STAT_LEDS
1997 1997
 
1998
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1999
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2000
-//#define PHOTOGRAPH_PIN     23
2001
-
2002 1998
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2003 1999
 //#define SF_ARC_FIX
2004 2000
 

+ 23
- 5
Marlin/src/config/examples/ArmEd/Configuration_adv.h View File

@@ -1813,12 +1813,30 @@
1813 1813
 // @section extras
1814 1814
 
1815 1815
 /**
1816
- * Canon Hack Development Kit
1817
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1816
+ * Photo G-code
1817
+ * Add the M240 G-code to take a photo.
1818
+ * The photo can be triggered by a digital pin or a physical movement.
1818 1819
  */
1819
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1820
-#if PIN_EXISTS(CHDK)
1821
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1820
+//#define PHOTO_GCODE
1821
+#if ENABLED(PHOTO_GCODE)
1822
+  // A position to move to (and raise Z) before taking the photo
1823
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1824
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1825
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1826
+
1827
+  // Canon RC-1 or homebrew digital camera trigger
1828
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1829
+  //#define PHOTOGRAPH_PIN 23
1830
+
1831
+  // Canon Hack Development Kit
1832
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1833
+  //#define CHDK_PIN        4
1834
+
1835
+  // Optional second move with delay to trigger the camera shutter
1836
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1837
+
1838
+  // Duration to hold the switch or keep CHDK_PIN high
1839
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1822 1840
 #endif
1823 1841
 
1824 1842
 /**

+ 0
- 4
Marlin/src/config/examples/Azteeg/X5GT/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 #define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 0
- 4
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -1807,12 +1807,30 @@
1807 1807
 // @section extras
1808 1808
 
1809 1809
 /**
1810
- * Canon Hack Development Kit
1811
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1810
+ * Photo G-code
1811
+ * Add the M240 G-code to take a photo.
1812
+ * The photo can be triggered by a digital pin or a physical movement.
1812 1813
  */
1813
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1814
-#if PIN_EXISTS(CHDK)
1815
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1814
+//#define PHOTO_GCODE
1815
+#if ENABLED(PHOTO_GCODE)
1816
+  // A position to move to (and raise Z) before taking the photo
1817
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1818
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1819
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1820
+
1821
+  // Canon RC-1 or homebrew digital camera trigger
1822
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1823
+  //#define PHOTOGRAPH_PIN 23
1824
+
1825
+  // Canon Hack Development Kit
1826
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1827
+  //#define CHDK_PIN        4
1828
+
1829
+  // Optional second move with delay to trigger the camera shutter
1830
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1831
+
1832
+  // Duration to hold the switch or keep CHDK_PIN high
1833
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1816 1834
 #endif
1817 1835
 
1818 1836
 /**

+ 0
- 4
Marlin/src/config/examples/BIBO/TouchX/default/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/BQ/Hephestos/Configuration.h View File

@@ -1982,10 +1982,6 @@
1982 1982
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1983 1983
 //#define TEMP_STAT_LEDS
1984 1984
 
1985
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1986
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1987
-//#define PHOTOGRAPH_PIN     23
1988
-
1989 1985
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1990 1986
 //#define SF_ARC_FIX
1991 1987
 

+ 23
- 5
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/BQ/Hephestos_2/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -1816,12 +1816,30 @@
1816 1816
 // @section extras
1817 1817
 
1818 1818
 /**
1819
- * Canon Hack Development Kit
1820
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1819
+ * Photo G-code
1820
+ * Add the M240 G-code to take a photo.
1821
+ * The photo can be triggered by a digital pin or a physical movement.
1821 1822
  */
1822
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1823
-#if PIN_EXISTS(CHDK)
1824
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1823
+//#define PHOTO_GCODE
1824
+#if ENABLED(PHOTO_GCODE)
1825
+  // A position to move to (and raise Z) before taking the photo
1826
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1827
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1828
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1829
+
1830
+  // Canon RC-1 or homebrew digital camera trigger
1831
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1832
+  //#define PHOTOGRAPH_PIN 23
1833
+
1834
+  // Canon Hack Development Kit
1835
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1836
+  //#define CHDK_PIN        4
1837
+
1838
+  // Optional second move with delay to trigger the camera shutter
1839
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1840
+
1841
+  // Duration to hold the switch or keep CHDK_PIN high
1842
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1825 1843
 #endif
1826 1844
 
1827 1845
 /**

+ 0
- 4
Marlin/src/config/examples/BQ/WITBOX/Configuration.h View File

@@ -1982,10 +1982,6 @@
1982 1982
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1983 1983
 //#define TEMP_STAT_LEDS
1984 1984
 
1985
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1986
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1987
-//#define PHOTOGRAPH_PIN     23
1988
-
1989 1985
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1990 1986
 //#define SF_ARC_FIX
1991 1987
 

+ 23
- 5
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Cartesio/Configuration.h View File

@@ -1993,10 +1993,6 @@
1993 1993
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1994 1994
 #define TEMP_STAT_LEDS
1995 1995
 
1996
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1997
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1998
-//#define PHOTOGRAPH_PIN     23
1999
-
2000 1996
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2001 1997
 //#define SF_ARC_FIX
2002 1998
 

+ 23
- 5
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/CR-10/Configuration.h View File

@@ -2004,10 +2004,6 @@
2004 2004
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2005 2005
 //#define TEMP_STAT_LEDS
2006 2006
 
2007
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2008
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2009
-//#define PHOTOGRAPH_PIN     23
2010
-
2011 2007
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2012 2008
 //#define SF_ARC_FIX
2013 2009
 

+ 23
- 5
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/CR-10S/Configuration.h View File

@@ -1995,10 +1995,6 @@
1995 1995
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1996 1996
 //#define TEMP_STAT_LEDS
1997 1997
 
1998
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1999
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2000
-//#define PHOTOGRAPH_PIN     23
2001
-
2002 1998
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2003 1999
 //#define SF_ARC_FIX
2004 2000
 

+ 23
- 5
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/CR-10mini/Configuration.h View File

@@ -2013,10 +2013,6 @@
2013 2013
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2014 2014
 //#define TEMP_STAT_LEDS
2015 2015
 
2016
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2017
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2018
-//#define PHOTOGRAPH_PIN     23
2019
-
2020 2016
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2021 2017
 //#define SF_ARC_FIX
2022 2018
 

+ 23
- 5
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/CR-8/Configuration.h View File

@@ -2004,10 +2004,6 @@
2004 2004
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2005 2005
 //#define TEMP_STAT_LEDS
2006 2006
 
2007
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2008
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2009
-//#define PHOTOGRAPH_PIN     23
2010
-
2011 2007
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2012 2008
 //#define SF_ARC_FIX
2013 2009
 

+ 23
- 5
Marlin/src/config/examples/Creality/CR-8/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/Ender-2/Configuration.h View File

@@ -1998,10 +1998,6 @@
1998 1998
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1999 1999
 //#define TEMP_STAT_LEDS
2000 2000
 
2001
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2002
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2003
-//#define PHOTOGRAPH_PIN     23
2004
-
2005 2001
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2006 2002
 //#define SF_ARC_FIX
2007 2003
 

+ 23
- 5
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/Ender-3/Configuration.h View File

@@ -1998,10 +1998,6 @@
1998 1998
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1999 1999
 //#define TEMP_STAT_LEDS
2000 2000
 
2001
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2002
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2003
-//#define PHOTOGRAPH_PIN     23
2004
-
2005 2001
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2006 2002
 //#define SF_ARC_FIX
2007 2003
 

+ 23
- 5
Marlin/src/config/examples/Creality/Ender-3/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Creality/Ender-4/Configuration.h View File

@@ -2004,10 +2004,6 @@
2004 2004
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2005 2005
 //#define TEMP_STAT_LEDS
2006 2006
 
2007
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2008
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2009
-//#define PHOTOGRAPH_PIN     23
2010
-
2011 2007
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2012 2008
 //#define SF_ARC_FIX
2013 2009
 

+ 23
- 5
Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Einstart-S/Configuration.h View File

@@ -2000,10 +2000,6 @@
2000 2000
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2001 2001
 //#define TEMP_STAT_LEDS
2002 2002
 
2003
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2004
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2005
-//#define PHOTOGRAPH_PIN     23
2006
-
2007 2003
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2008 2004
 //#define SF_ARC_FIX
2009 2005
 

+ 23
- 5
Marlin/src/config/examples/Einstart-S/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Felix/Configuration.h View File

@@ -1976,10 +1976,6 @@
1976 1976
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1977 1977
 //#define TEMP_STAT_LEDS
1978 1978
 
1979
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1980
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1981
-//#define PHOTOGRAPH_PIN     23
1982
-
1983 1979
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1984 1980
 //#define SF_ARC_FIX
1985 1981
 

+ 23
- 5
Marlin/src/config/examples/Felix/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Felix/DUAL/Configuration.h View File

@@ -1976,10 +1976,6 @@
1976 1976
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1977 1977
 //#define TEMP_STAT_LEDS
1978 1978
 
1979
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1980
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1981
-//#define PHOTOGRAPH_PIN     23
1982
-
1983 1979
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1984 1980
 //#define SF_ARC_FIX
1985 1981
 

+ 0
- 4
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration.h View File

@@ -1986,10 +1986,6 @@
1986 1986
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1987 1987
 //#define TEMP_STAT_LEDS
1988 1988
 
1989
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1990
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1991
-//#define PHOTOGRAPH_PIN     23
1992
-
1993 1989
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1994 1990
 //#define SF_ARC_FIX
1995 1991
 

+ 23
- 5
Marlin/src/config/examples/FlashForge/CreatorPro/Configuration_adv.h View File

@@ -1807,12 +1807,30 @@
1807 1807
 // @section extras
1808 1808
 
1809 1809
 /**
1810
- * Canon Hack Development Kit
1811
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1810
+ * Photo G-code
1811
+ * Add the M240 G-code to take a photo.
1812
+ * The photo can be triggered by a digital pin or a physical movement.
1812 1813
  */
1813
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1814
-#if PIN_EXISTS(CHDK)
1815
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1814
+//#define PHOTO_GCODE
1815
+#if ENABLED(PHOTO_GCODE)
1816
+  // A position to move to (and raise Z) before taking the photo
1817
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1818
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1819
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1820
+
1821
+  // Canon RC-1 or homebrew digital camera trigger
1822
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1823
+  //#define PHOTOGRAPH_PIN 23
1824
+
1825
+  // Canon Hack Development Kit
1826
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1827
+  //#define CHDK_PIN        4
1828
+
1829
+  // Optional second move with delay to trigger the camera shutter
1830
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1831
+
1832
+  // Duration to hold the switch or keep CHDK_PIN high
1833
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1816 1834
 #endif
1817 1835
 
1818 1836
 /**

+ 0
- 4
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration.h View File

@@ -2000,10 +2000,6 @@
2000 2000
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2001 2001
 //#define TEMP_STAT_LEDS
2002 2002
 
2003
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2004
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2005
-//#define PHOTOGRAPH_PIN     23
2006
-
2007 2003
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2008 2004
 //#define SF_ARC_FIX
2009 2005
 

+ 23
- 5
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Formbot/Raptor/Configuration.h View File

@@ -2099,10 +2099,6 @@
2099 2099
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2100 2100
 //#define TEMP_STAT_LEDS
2101 2101
 
2102
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2103
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2104
-//#define PHOTOGRAPH_PIN     23
2105
-
2106 2102
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2107 2103
 //#define SF_ARC_FIX
2108 2104
 

+ 23
- 5
Marlin/src/config/examples/Formbot/Raptor/Configuration_adv.h View File

@@ -1810,12 +1810,30 @@
1810 1810
 // @section extras
1811 1811
 
1812 1812
 /**
1813
- * Canon Hack Development Kit
1814
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1813
+ * Photo G-code
1814
+ * Add the M240 G-code to take a photo.
1815
+ * The photo can be triggered by a digital pin or a physical movement.
1815 1816
  */
1816
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1817
-#if PIN_EXISTS(CHDK)
1818
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1817
+//#define PHOTO_GCODE
1818
+#if ENABLED(PHOTO_GCODE)
1819
+  // A position to move to (and raise Z) before taking the photo
1820
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1821
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1822
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1823
+
1824
+  // Canon RC-1 or homebrew digital camera trigger
1825
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1826
+  //#define PHOTOGRAPH_PIN 23
1827
+
1828
+  // Canon Hack Development Kit
1829
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1830
+  //#define CHDK_PIN        4
1831
+
1832
+  // Optional second move with delay to trigger the camera shutter
1833
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1834
+
1835
+  // Duration to hold the switch or keep CHDK_PIN high
1836
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1819 1837
 #endif
1820 1838
 
1821 1839
 /**

+ 0
- 4
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration.h View File

@@ -2029,10 +2029,6 @@
2029 2029
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2030 2030
 //#define TEMP_STAT_LEDS
2031 2031
 
2032
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2033
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2034
-//#define PHOTOGRAPH_PIN     23
2035
-
2036 2032
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2037 2033
 //#define SF_ARC_FIX
2038 2034
 

+ 23
- 5
Marlin/src/config/examples/Formbot/T_Rex_2+/Configuration_adv.h View File

@@ -1813,12 +1813,30 @@
1813 1813
 // @section extras
1814 1814
 
1815 1815
 /**
1816
- * Canon Hack Development Kit
1817
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1816
+ * Photo G-code
1817
+ * Add the M240 G-code to take a photo.
1818
+ * The photo can be triggered by a digital pin or a physical movement.
1818 1819
  */
1819
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1820
-#if PIN_EXISTS(CHDK)
1821
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1820
+//#define PHOTO_GCODE
1821
+#if ENABLED(PHOTO_GCODE)
1822
+  // A position to move to (and raise Z) before taking the photo
1823
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1824
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1825
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1826
+
1827
+  // Canon RC-1 or homebrew digital camera trigger
1828
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1829
+  //#define PHOTOGRAPH_PIN 23
1830
+
1831
+  // Canon Hack Development Kit
1832
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1833
+  //#define CHDK_PIN        4
1834
+
1835
+  // Optional second move with delay to trigger the camera shutter
1836
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1837
+
1838
+  // Duration to hold the switch or keep CHDK_PIN high
1839
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1822 1840
 #endif
1823 1841
 
1824 1842
 /**

+ 0
- 4
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration.h View File

@@ -2022,10 +2022,6 @@
2022 2022
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2023 2023
 //#define TEMP_STAT_LEDS
2024 2024
 
2025
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2026
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2027
-//#define PHOTOGRAPH_PIN     23
2028
-
2029 2025
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2030 2026
 //#define SF_ARC_FIX
2031 2027
 

+ 23
- 5
Marlin/src/config/examples/Formbot/T_Rex_3/Configuration_adv.h View File

@@ -1813,12 +1813,30 @@
1813 1813
 // @section extras
1814 1814
 
1815 1815
 /**
1816
- * Canon Hack Development Kit
1817
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1816
+ * Photo G-code
1817
+ * Add the M240 G-code to take a photo.
1818
+ * The photo can be triggered by a digital pin or a physical movement.
1818 1819
  */
1819
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1820
-#if PIN_EXISTS(CHDK)
1821
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1820
+//#define PHOTO_GCODE
1821
+#if ENABLED(PHOTO_GCODE)
1822
+  // A position to move to (and raise Z) before taking the photo
1823
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1824
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1825
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1826
+
1827
+  // Canon RC-1 or homebrew digital camera trigger
1828
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1829
+  //#define PHOTOGRAPH_PIN 23
1830
+
1831
+  // Canon Hack Development Kit
1832
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1833
+  //#define CHDK_PIN        4
1834
+
1835
+  // Optional second move with delay to trigger the camera shutter
1836
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1837
+
1838
+  // Duration to hold the switch or keep CHDK_PIN high
1839
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1822 1840
 #endif
1823 1841
 
1824 1842
 /**

+ 0
- 4
Marlin/src/config/examples/Geeetech/A10M/Configuration.h View File

@@ -1979,10 +1979,6 @@
1979 1979
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1980 1980
 //#define TEMP_STAT_LEDS
1981 1981
 
1982
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1983
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1984
-//#define PHOTOGRAPH_PIN     23
1985
-
1986 1982
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1987 1983
 //#define SF_ARC_FIX
1988 1984
 

+ 23
- 5
Marlin/src/config/examples/Geeetech/A10M/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/Geeetech/A20M/Configuration.h View File

@@ -1983,10 +1983,6 @@
1983 1983
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1984 1984
 //#define TEMP_STAT_LEDS
1985 1985
 
1986
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1987
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1988
-//#define PHOTOGRAPH_PIN     23
1989
-
1990 1986
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
1991 1987
 //#define SF_ARC_FIX
1992 1988
 

+ 23
- 5
Marlin/src/config/examples/Geeetech/A20M/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/Geeetech/GT2560/Configuration.h View File

@@ -2009,10 +2009,6 @@
2009 2009
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2010 2010
 //#define TEMP_STAT_LEDS
2011 2011
 
2012
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2013
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2014
-//#define PHOTOGRAPH_PIN     23
2015
-
2016 2012
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2017 2013
 //#define SF_ARC_FIX
2018 2014
 

+ 0
- 4
Marlin/src/config/examples/Geeetech/I3_Pro_X-GT2560/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 0
- 4
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration.h View File

@@ -2001,10 +2001,6 @@
2001 2001
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2002 2002
 //#define TEMP_STAT_LEDS
2003 2003
 
2004
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2005
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2006
-//#define PHOTOGRAPH_PIN     23
2007
-
2008 2004
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2009 2005
 //#define SF_ARC_FIX
2010 2006
 

+ 23
- 5
Marlin/src/config/examples/Geeetech/MeCreator2/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/bltouch/Configuration.h View File

@@ -2010,10 +2010,6 @@
2010 2010
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2011 2011
 //#define TEMP_STAT_LEDS
2012 2012
 
2013
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2014
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2015
-//#define PHOTOGRAPH_PIN     23
2016
-
2017 2013
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2018 2014
 //#define SF_ARC_FIX
2019 2015
 

+ 0
- 4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro B/noprobe/Configuration.h View File

@@ -2009,10 +2009,6 @@
2009 2009
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2010 2010
 //#define TEMP_STAT_LEDS
2011 2011
 
2012
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2013
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2014
-//#define PHOTOGRAPH_PIN     23
2015
-
2016 2012
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2017 2013
 //#define SF_ARC_FIX
2018 2014
 

+ 0
- 4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Infitary/i3-M508/Configuration.h View File

@@ -1998,10 +1998,6 @@
1998 1998
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1999 1999
 //#define TEMP_STAT_LEDS
2000 2000
 
2001
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2002
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2003
-//#define PHOTOGRAPH_PIN     23
2004
-
2005 2001
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2006 2002
 //#define SF_ARC_FIX
2007 2003
 

+ 23
- 5
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/JGAurora/A5/Configuration.h View File

@@ -2006,10 +2006,6 @@
2006 2006
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2007 2007
 //#define TEMP_STAT_LEDS
2008 2008
 
2009
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2010
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2011
-//#define PHOTOGRAPH_PIN     23
2012
-
2013 2009
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2014 2010
 //#define SF_ARC_FIX
2015 2011
 

+ 23
- 5
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/MakerParts/Configuration.h View File

@@ -2014,10 +2014,6 @@
2014 2014
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2015 2015
 //#define TEMP_STAT_LEDS
2016 2016
 
2017
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2018
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2019
-//#define PHOTOGRAPH_PIN     23
2020
-
2021 2017
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2022 2018
 //#define SF_ARC_FIX
2023 2019
 

+ 23
- 5
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Malyan/M150/Configuration.h View File

@@ -2022,10 +2022,6 @@
2022 2022
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2023 2023
 //#define TEMP_STAT_LEDS
2024 2024
 
2025
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2026
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2027
-//#define PHOTOGRAPH_PIN     23
2028
-
2029 2025
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2030 2026
 //#define SF_ARC_FIX
2031 2027
 

+ 23
- 5
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Malyan/M200/Configuration.h View File

@@ -1993,10 +1993,6 @@
1993 1993
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1994 1994
 //#define TEMP_STAT_LEDS
1995 1995
 
1996
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1997
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1998
-//#define PHOTOGRAPH_PIN     23
1999
-
2000 1996
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2001 1997
 //#define SF_ARC_FIX
2002 1998
 

+ 23
- 5
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Micromake/C1/basic/Configuration.h View File

@@ -1998,10 +1998,6 @@
1998 1998
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1999 1999
 //#define TEMP_STAT_LEDS
2000 2000
 
2001
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2002
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2003
-//#define PHOTOGRAPH_PIN     23
2004
-
2005 2001
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2006 2002
 //#define SF_ARC_FIX
2007 2003
 

+ 0
- 4
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration.h View File

@@ -1998,10 +1998,6 @@
1998 1998
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1999 1999
 //#define TEMP_STAT_LEDS
2000 2000
 
2001
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2002
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2003
-//#define PHOTOGRAPH_PIN     23
2004
-
2005 2001
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2006 2002
 //#define SF_ARC_FIX
2007 2003
 

+ 23
- 5
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@@ -1808,12 +1808,30 @@
1808 1808
 // @section extras
1809 1809
 
1810 1810
 /**
1811
- * Canon Hack Development Kit
1812
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1811
+ * Photo G-code
1812
+ * Add the M240 G-code to take a photo.
1813
+ * The photo can be triggered by a digital pin or a physical movement.
1813 1814
  */
1814
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1815
-#if PIN_EXISTS(CHDK)
1816
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1815
+//#define PHOTO_GCODE
1816
+#if ENABLED(PHOTO_GCODE)
1817
+  // A position to move to (and raise Z) before taking the photo
1818
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1819
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1820
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1821
+
1822
+  // Canon RC-1 or homebrew digital camera trigger
1823
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1824
+  //#define PHOTOGRAPH_PIN 23
1825
+
1826
+  // Canon Hack Development Kit
1827
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1828
+  //#define CHDK_PIN        4
1829
+
1830
+  // Optional second move with delay to trigger the camera shutter
1831
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1832
+
1833
+  // Duration to hold the switch or keep CHDK_PIN high
1834
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1817 1835
 #endif
1818 1836
 
1819 1837
 /**

+ 0
- 4
Marlin/src/config/examples/Mks/Robin/Configuration.h View File

@@ -1996,10 +1996,6 @@
1996 1996
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1997 1997
 //#define TEMP_STAT_LEDS
1998 1998
 
1999
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2000
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2001
-//#define PHOTOGRAPH_PIN     23
2002
-
2003 1999
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2004 2000
 //#define SF_ARC_FIX
2005 2001
 

+ 23
- 5
Marlin/src/config/examples/Mks/Robin/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/Mks/Sbase/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

@@ -1816,12 +1816,30 @@
1816 1816
 // @section extras
1817 1817
 
1818 1818
 /**
1819
- * Canon Hack Development Kit
1820
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1819
+ * Photo G-code
1820
+ * Add the M240 G-code to take a photo.
1821
+ * The photo can be triggered by a digital pin or a physical movement.
1821 1822
  */
1822
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1823
-#if PIN_EXISTS(CHDK)
1824
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1823
+//#define PHOTO_GCODE
1824
+#if ENABLED(PHOTO_GCODE)
1825
+  // A position to move to (and raise Z) before taking the photo
1826
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1827
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1828
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1829
+
1830
+  // Canon RC-1 or homebrew digital camera trigger
1831
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1832
+  //#define PHOTOGRAPH_PIN 23
1833
+
1834
+  // Canon Hack Development Kit
1835
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1836
+  //#define CHDK_PIN        4
1837
+
1838
+  // Optional second move with delay to trigger the camera shutter
1839
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1840
+
1841
+  // Duration to hold the switch or keep CHDK_PIN high
1842
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1825 1843
 #endif
1826 1844
 
1827 1845
 /**

+ 0
- 4
Marlin/src/config/examples/RapideLite/RL200/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 23
- 5
Marlin/src/config/examples/RapideLite/RL200/Configuration_adv.h View File

@@ -1809,12 +1809,30 @@
1809 1809
 // @section extras
1810 1810
 
1811 1811
 /**
1812
- * Canon Hack Development Kit
1813
- * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1812
+ * Photo G-code
1813
+ * Add the M240 G-code to take a photo.
1814
+ * The photo can be triggered by a digital pin or a physical movement.
1814 1815
  */
1815
-//#define CHDK_PIN    4   // Set and enable a pin for triggering CHDK to take a picture
1816
-#if PIN_EXISTS(CHDK)
1817
-  #define CHDK_DELAY 50   // (ms) How long the pin should remain HIGH
1816
+//#define PHOTO_GCODE
1817
+#if ENABLED(PHOTO_GCODE)
1818
+  // A position to move to (and raise Z) before taking the photo
1819
+  //#define PHOTO_POSITION { X_MAX_POS - 5, Y_MAX_POS, 0 }  // { xpos, ypos, zraise }
1820
+  //#define PHOTO_DELAY_MS   100                            // (ms) Duration to pause before moving back
1821
+  //#define PHOTO_RETRACT_MM   6.5                          // (mm) E retract/recover for the photo move
1822
+
1823
+  // Canon RC-1 or homebrew digital camera trigger
1824
+  // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1825
+  //#define PHOTOGRAPH_PIN 23
1826
+
1827
+  // Canon Hack Development Kit
1828
+  // http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
1829
+  //#define CHDK_PIN        4
1830
+
1831
+  // Optional second move with delay to trigger the camera shutter
1832
+  //#define PHOTO_SWITCH_POSITION { X_MAX_POS, Y_MAX_POS }  // { xpos, ypos }
1833
+
1834
+  // Duration to hold the switch or keep CHDK_PIN high
1835
+  //#define PHOTO_SWITCH_MS   50 // (ms)
1818 1836
 #endif
1819 1837
 
1820 1838
 /**

+ 0
- 4
Marlin/src/config/examples/RepRapPro/Huxley/Configuration.h View File

@@ -2043,10 +2043,6 @@ Black rubber belt(MXL), 18 - tooth aluminium pulley : 87.489 step per mm (Huxley
2043 2043
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
2044 2044
 //#define TEMP_STAT_LEDS
2045 2045
 
2046
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
2047
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
2048
-//#define PHOTOGRAPH_PIN     23
2049
-
2050 2046
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2051 2047
 //#define SF_ARC_FIX
2052 2048
 

+ 0
- 4
Marlin/src/config/examples/RepRapWorld/Megatronics/Configuration.h View File

@@ -1994,10 +1994,6 @@
1994 1994
 // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
1995 1995
 //#define TEMP_STAT_LEDS
1996 1996
 
1997
-// M240  Triggers a camera by emulating a Canon RC-1 Remote
1998
-// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
1999
-//#define PHOTOGRAPH_PIN     23
2000
-
2001 1997
 // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
2002 1998
 //#define SF_ARC_FIX
2003 1999
 

+ 0
- 0
Marlin/src/config/examples/RigidBot/Configuration.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save