Guest User

Untitled

a guest
Jan 24th, 2018
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 126.24 KB | None | 0 0
  1. /**
  2. * MK4duo Firmware for 3D Printer, Laser and CNC
  3. *
  4. * Based on Marlin, Sprinter and grbl
  5. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  6. * Copyright (C) 2013 Alberto Cotronei @MagoKimbra
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22.  
  23. /**
  24. * Configuration_Feature.h
  25. *
  26. * This configuration file contains all features that can be enabled.
  27. *
  28. * EXTRUDER FEATURES:
  29. * - Fan configuration
  30. * - Volumetric extrusion
  31. * - Filament Diameter
  32. * - Single nozzle
  33. * - BariCUDA paste extruder
  34. * - Solenoid extruder
  35. * - Color Mixing Extruder
  36. * - Multiextruder old MKR4
  37. * - Multiextruder MKR6
  38. * - Multiextruder MKR12
  39. * - Multiextruder MKSE6 (multiextruder with Servo)
  40. * - Multiextruder NPr2
  41. * - Multiextruder DONDOLO
  42. * - Extruder idle oozing prevention
  43. * - Extruder run-out prevention
  44. * - Bowden Filament management
  45. * - Extruder Advance Linear Pressure Control
  46. * MOTION FEATURES:
  47. * - Software endstops
  48. * - Endstops only for homing
  49. * - Abort on endstop hit feature
  50. * - G38.2 and G38.3 Probe Target
  51. * - Scad Mesh Output
  52. * - R/C Servo
  53. * - Late Z axis
  54. * - Ahead slowdown
  55. * - Quick home
  56. * - Home Y before X
  57. * - Force Home XY before Home Z
  58. * - Babystepping
  59. * - Firmware retract
  60. * - Dual X-carriage
  61. * - X-axis two driver
  62. * - Y-axis two driver
  63. * - Z-axis two - three - four driver
  64. * - XY Frequency limit
  65. * - Skeinforge arc fix
  66. * SENSORS FEATURES:
  67. * - Extruder Encoder Control
  68. * - Filament diameter sensor
  69. * - Filament Runout sensor
  70. * - Power consumption sensor
  71. * - Flow sensor
  72. * - Door open sensor
  73. * - Power check sensor
  74. * ADDON FEATURES:
  75. * - EEPROM
  76. * - SDCARD
  77. * - LCD Language
  78. * - LCD
  79. * - Canon RC-1 Remote
  80. * - Camera trigger
  81. * - RFID card reader
  82. * - BLINKM
  83. * - RGB LED
  84. * - PCA 9632 PWM LED
  85. * - Adafruit Neopixel LED driver
  86. * - Printer Event LEDs
  87. * - Laser beam
  88. * - CNC Router
  89. * - Case Light
  90. * ADVANCED MOTION FEATURES:
  91. * - Stepper auto deactivation
  92. * - Double / Quad Stepping
  93. * - Low speed stepper
  94. * - Microstepping
  95. * - Motor's current
  96. * - I2C DIGIPOT
  97. * - Toshiba steppers
  98. * - TMC26X motor drivers
  99. * - Trinamic TMC2130 motor drivers
  100. * - Trinamic TMC2208 motor drivers
  101. * - L6470 motor drivers
  102. * ADVANCED FEATURES:
  103. * - Buffer stuff
  104. * - Nozzle Clean Feature
  105. * - Nozzle Park
  106. * - Advanced Pause Park
  107. * - G20/G21 Inch mode support
  108. * - Report JSON-style response
  109. * - M43 command for pins info and testing
  110. * - Extend capabilities report
  111. * - Watchdog
  112. * - Start / Stop Gcode
  113. * - Proportional Font ratio
  114. * - User menu items
  115. *
  116. * Basic-settings can be found in Configuration_Basic.h
  117. * Mechanisms-settings can be found in Configuration_Xxxxxx.h (where Xxxxxx can be: Cartesian - Delta - Core - Scara)
  118. * Pins-settings can be found in "Configuration_Pins.h"
  119. *
  120. */
  121.  
  122. #ifndef _CONFIGURATION_FEATURE_H_
  123. #define _CONFIGURATION_FEATURE_H_
  124.  
  125. /**************************************************************************
  126. **************************** Fan configuration ***************************
  127. **************************************************************************/
  128. // FAN PWM speed
  129. // 0 - 15Hz 256 values
  130. // 1 - 30Hz 128 values
  131. // 2 - 61Hz 64 values
  132. // 3 - 122Hz 32 values
  133. // 4 - 244Hz 16 values
  134. #define FAN_PWM_SPEED 0
  135.  
  136. // When first starting the main fan, run it at full speed for the
  137. // given number of milliseconds. This gets the fan spinning reliably
  138. // before setting a PWM value.
  139. //#define FAN_KICKSTART_TIME 200
  140.  
  141. // This defines the minimal speed for the main fan
  142. // set minimal speed for reliable running (1-255)
  143. #define FAN_MIN_PWM 1
  144.  
  145. // To reverse the logic of fan pins
  146. //#define INVERTED_FAN_PINS
  147.  
  148. // AUTO FAN - Fans for cooling Hotend or Controller Fan
  149. // Put number Hotend in fan to automatically turn on/off when the associated
  150. // hotend temperature is above/below HOTEND AUTO FAN TEMPERATURE.
  151. // Or put 7 for controller fan
  152. // -1 disables auto mode.
  153. // Default fan 1 is auto fan for Hotend 0
  154. #define AUTO_FAN { -1, 0, -1, -1, -1, -1 }
  155. // Parameters for Hotend Fan
  156. #define HOTEND_AUTO_FAN_TEMPERATURE 50
  157. #define HOTEND_AUTO_FAN_SPEED 255 // 255 = full speed
  158. #define HOTEND_AUTO_FAN_MIN_SPEED 0
  159. // Parameters for Controller Fan
  160. #define CONTROLLERFAN_SECS 60 // How many seconds, after all motors were disabled, the fan should run
  161. #define CONTROLLERFAN_SPEED 255 // 255 = full speed
  162. #define CONTROLLERFAN_MIN_SPEED 0
  163. /**************************************************************************/
  164.  
  165.  
  166. /***********************************************************************
  167. ************************ Volumetric extrusion *************************
  168. ***********************************************************************
  169. * *
  170. * Volumetric extrusion default state *
  171. * Activate to make volumetric extrusion the default method, *
  172. * with DEFAULT NOMINAL FILAMENT DIA as the default diameter. *
  173. * *
  174. * M200 D0 to disable, M200 Dn to set a new diameter. *
  175. * *
  176. ***********************************************************************/
  177. //#define VOLUMETRIC_EXTRUSION
  178. //#define VOLUMETRIC_DEFAULT_ON
  179. /***********************************************************************/
  180.  
  181.  
  182. /***********************************************************************
  183. ************************* Filament Diameter ***************************
  184. ***********************************************************************
  185. * *
  186. * Generally expected filament diameter (1.75, 2.85, 3.0, ...) *
  187. * Used for Volumetric, Filament Width Sensor, etc. *
  188. ***********************************************************************/
  189. #define DEFAULT_NOMINAL_FILAMENT_DIA 1.75
  190. /***********************************************************************/
  191.  
  192.  
  193. /***********************************************************************
  194. **************************** Single nozzle ****************************
  195. ***********************************************************************
  196. * *
  197. * This is used for single nozzle and multiple extrusion configuration *
  198. * *
  199. * Uncomment SINGLENOZZLE to enable this feature *
  200. * *
  201. ***********************************************************************/
  202. //#define SINGLENOZZLE
  203. /***********************************************************************/
  204.  
  205.  
  206. /***********************************************************************
  207. *********************** BariCUDA paste extruder ***********************
  208. ***********************************************************************
  209. * *
  210. * Support for the BariCUDA paste extruder. *
  211. * *
  212. ***********************************************************************/
  213. //#define BARICUDA
  214. /***********************************************************************/
  215.  
  216.  
  217. /***********************************************************************
  218. ************************** Solenoid extruder **************************
  219. ***********************************************************************
  220. * *
  221. * Activate a solenoid on the active extruder with M380. *
  222. * Disable all with M381. *
  223. * Define SOL0_PIN, SOL1_PIN, etc., for each extruder that *
  224. * has a solenoid. *
  225. * *
  226. ***********************************************************************/
  227. //#define EXT_SOLENOID
  228. /***********************************************************************/
  229.  
  230.  
  231. /***********************************************************************
  232. ********************** COLOR MIXING EXTRUDER **************************
  233. ***********************************************************************
  234. * *
  235. * Extends G0/G1 with mixing factors ABCDHI for up to 6 steppers. *
  236. * Adds a new code, M165, to set the current mix factors. *
  237. * Optional support for Repetier M163, M164, and virtual tools. *
  238. * Extends the stepping routines to move multiple steppers in *
  239. * proportion to the mix. *
  240. * *
  241. ***********************************************************************/
  242. //#define COLOR_MIXING_EXTRUDER
  243.  
  244. // Number of steppers in your mixing extruder
  245. #define MIXING_STEPPERS 2
  246. // Use the Virtual Tool method with M163 and M164
  247. #define MIXING_VIRTUAL_TOOLS 16
  248. /***********************************************************************/
  249.  
  250.  
  251. /***********************************************************************
  252. ************************* Multiextruder MKR4 **************************
  253. ***********************************************************************
  254. * *
  255. * Setting for more extruder width relay system *
  256. * This is old system for 4 extruder and 8 relay. *
  257. * See Configuration_pins.h for pin command relay *
  258. * *
  259. * Uncomment MKR4 to enable this feature *
  260. * *
  261. * Uncomment INVERTED_RELE_PINS if your relay switches with GND *
  262. ***********************************************************************/
  263. //#define MKR4
  264. //#define INVERTED_RELE_PINS
  265. /***********************************************************************/
  266.  
  267.  
  268. /***********************************************************************
  269. ************************* Multiextruder MKR6 **************************
  270. ***********************************************************************
  271. * *
  272. * Setting for more extruder width relay system *
  273. * This is new system for 6 extruder width 2 driver and 8 relay. *
  274. * See Configuration_pins.h for pin command relay *
  275. * *
  276. * Uncomment MKR6 to enable this feature *
  277. * *
  278. * Uncomment INVERTED_RELE_PINS if your relay switches with GND *
  279. ***********************************************************************/
  280. //#define MKR6
  281. //#define INVERTED_RELE_PINS
  282. /***********************************************************************/
  283.  
  284.  
  285. /***********************************************************************
  286. ************************* Multiextruder MKR12 *************************
  287. ***********************************************************************
  288. * *
  289. * Setting for more extruder width relay system *
  290. * This is new system for 12 extruder width 4 driver and 16 relay. *
  291. * See Configuration_pins.h for pin command relay *
  292. * *
  293. * Uncomment MKR12 to enable this feature *
  294. * *
  295. * Uncomment INVERTED_RELE_PINS if your relay switches with GND *
  296. ***********************************************************************/
  297. //#define MKR12
  298. //#define INVERTED_RELE_PINS
  299. /***********************************************************************/
  300.  
  301.  
  302. /***********************************************************************
  303. ************************* Multiextruder MKSE6 *************************
  304. ***********************************************************************
  305. * *
  306. * Setting for more extruder width servo system *
  307. * This is new system for 6 extruder width 1 driver and 1 servo. *
  308. * *
  309. * Uncomment MKSE6 to enable this feature *
  310. * *
  311. ***********************************************************************/
  312. //#define MKSE6
  313.  
  314. #define MKSE6_SERVO_INDEX 0
  315. #define MKSE6_SERVOPOS_E0 -60
  316. #define MKSE6_SERVOPOS_E1 -30
  317. #define MKSE6_SERVOPOS_E2 0
  318. #define MKSE6_SERVOPOS_E3 30
  319. #define MKSE6_SERVOPOS_E4 60
  320. #define MKSE6_SERVOPOS_E5 90
  321. #define MKSE6_SERVO_DELAY 1000
  322. /***********************************************************************/
  323.  
  324.  
  325. /***********************************************************************
  326. *********************** Multiextruder NPr2 ****************************
  327. ***********************************************************************
  328. * *
  329. * Setting for color meccanism NPr2 by NicolaP (www.3dmakerlab.it) *
  330. * Find angle setting by g-Code "M997 Cxxx" *
  331. * *
  332. * Uncomment NPR2 to enable this feature *
  333. * You also need to set E_MIN_PIN in Configuration_pins.h *
  334. * *
  335. ***********************************************************************/
  336. //#define NPR2
  337. #define COLOR_STEP {0, 10, 20, 30} // CARTER ANGLE
  338. #define COLOR_SLOWRATE 170 // MICROSECOND delay for carter motor routine (Carter Motor Feedrate: upper value-slow feedrate)
  339. #define COLOR_HOMERATE 4 // FEEDRATE for carter home
  340. #define MOTOR_ANGLE 1.8 // Nema angle for single step
  341. #define DRIVER_MICROSTEP 4 // Microstep moltiplicator driver (set jumper MS1-2-3) off-on-off 1/4 microstepping.
  342. #define CARTER_MOLTIPLICATOR 14.22 // CARTER MOLTIPLICATOR (gear ratio 13/31-10/31)
  343. /***********************************************************************/
  344.  
  345.  
  346. /***********************************************************************
  347. ********************* Dual Extruder DONDOLO ***************************
  348. ***********************************************************************
  349. * *
  350. * Setting for multiextruder DONDOLO 1.0b by Gianni Franci *
  351. * Enable DONDOLO SINGLE MOTOR for original DONDOLO by Gianni Franci *
  352. * Enable DONDOLO DUAL MOTOR for bowden and dual EXTRUDER *
  353. * http://www.thingiverse.com/thing:673816 *
  354. * For function set NUM_SERVOS +1 if you use for endstop or probe *
  355. * Set DONDOLO SERVO INDEX for servo you use for DONDOLO *
  356. * Set DONDOLO SERVOPOS E0 angle for E0 extruder *
  357. * Set DONDOLO SERVOPOS E1 angle for E1 extruder *
  358. * Remember set HOTEND OFFSET X Y Z *
  359. * *
  360. ***********************************************************************/
  361. //#define DONDOLO_SINGLE_MOTOR
  362. //#define DONDOLO_DUAL_MOTOR
  363.  
  364. #define DONDOLO_SERVO_INDEX 0
  365. #define DONDOLO_SERVOPOS_E0 120
  366. #define DONDOLO_SERVOPOS_E1 10
  367. #define DONDOLO_SERVO_DELAY 1000
  368. /***********************************************************************/
  369.  
  370.  
  371. /***********************************************************************
  372. **************** Extruder idle oozing prevention **********************
  373. ***********************************************************************
  374. * *
  375. * This prevents undesired ejection of filament while the printer *
  376. * is in idle with the hotend turned on. *
  377. * Eg. during the heating up process. *
  378. * *
  379. * If the extruder motor is idle for more than SECONDS and the *
  380. * temperature is over IDLE_OOZING_MINTEMP some filament is retracted. *
  381. * The filament retracted is re-added before the next extrusion or *
  382. * when the target temperature is less than IDLE_OOZING_MINTEMP and *
  383. * the actual temperature is greater than IDLE_OOZING_MINTEMP. *
  384. * *
  385. * PS: Always remember to set your extruder target temperature to 0°C *
  386. * before shutdown the printer if you enable this feature. *
  387. * *
  388. * Uncomment IDLE OOZING PREVENT to enable this feature *
  389. * *
  390. ***********************************************************************/
  391. //#define IDLE_OOZING_PREVENT
  392. #define IDLE_OOZING_MINTEMP 190
  393. #define IDLE_OOZING_FEEDRATE 50 //default feedrate for retracting (mm/s)
  394. #define IDLE_OOZING_SECONDS 5
  395. #define IDLE_OOZING_LENGTH 15 //default retract length (positive mm)
  396. #define IDLE_OOZING_RECOVER_LENGTH 0 //default additional recover length (mm, added to retract length when recovering)
  397. #define IDLE_OOZING_RECOVER_FEEDRATE 50 //default feedrate for recovering from retraction (mm/s)
  398. /***********************************************************************/
  399.  
  400.  
  401. /*****************************************************************************************
  402. ***************************** Extruder run-out prevention *******************************
  403. *****************************************************************************************
  404. * *
  405. * If the machine is idle, and the temperature over MINTEMP, every couple of SECONDS *
  406. * some filament is extruded *
  407. * *
  408. * Uncomment EXTRUDER RUNOUT PREVENT to enable this feature *
  409. * *
  410. *****************************************************************************************/
  411. //#define EXTRUDER_RUNOUT_PREVENT
  412. #define EXTRUDER_RUNOUT_MINTEMP 190
  413. #define EXTRUDER_RUNOUT_SECONDS 30
  414. #define EXTRUDER_RUNOUT_SPEED 1500 // mm/m
  415. #define EXTRUDER_RUNOUT_EXTRUDE 5 // mm
  416. /*****************************************************************************************/
  417.  
  418.  
  419. /***********************************************************************
  420. ******************** Bowden Filament management ***********************
  421. ***********************************************************************
  422. * *
  423. * Uncomment EASY_LOAD to enable this feature *
  424. * *
  425. ***********************************************************************/
  426. //#define EASY_LOAD
  427. #define BOWDEN_LENGTH 250 // mm
  428. #define LCD_PURGE_LENGTH 3 // mm
  429. #define LCD_RETRACT_LENGTH 3 // mm
  430. #define LCD_PURGE_FEEDRATE 3 // mm/s
  431. #define LCD_RETRACT_FEEDRATE 10 // mm/s
  432. #define LCD_LOAD_FEEDRATE 8 // mm/s
  433. #define LCD_UNLOAD_FEEDRATE 8 // mm/s
  434. /***********************************************************************/
  435.  
  436.  
  437. /*****************************************************************************************
  438. ****************** Extruder Advance Linear Pressure Control *****************************
  439. *****************************************************************************************
  440. * *
  441. * Assumption: advance = k * (delta velocity) *
  442. * K=0 means advance disabled. *
  443. * To get a rough start value for calibration, measure your "free filament length" *
  444. * between the hobbed bolt and the nozzle (in cm). Use the formula below that fits *
  445. * your setup, where L is the "free filament length": *
  446. * *
  447. * Filament diameter | 1.75mm | 3.0mm | *
  448. * ----------------------------|-----------|------------| *
  449. * Stiff filament (PLA) | K=47*L/10 | K=139*L/10 | *
  450. * Softer filament (ABS, nGen) | K=88*L/10 | K=260*L/10 | *
  451. * *
  452. * Some Slicers produce Gcode with randomly jumping extrusion widths occasionally. *
  453. * For example within a 0.4mm perimeter it may produce a single segment of 0.05mm width. *
  454. * While this is harmless for normal printing (the fluid nature of the filament will *
  455. * close this very, very tiny gap), it throws off the LIN ADVANCE pressure adaption. *
  456. * *
  457. * For this case LIN ADVANCE E D RATIO can be used to set the extrusion:distance ratio *
  458. * to a fixed value. Note that using a fixed ratio will lead to wrong nozzle pressures *
  459. * if the slicer is using variable widths or layer heights within one print! *
  460. * *
  461. * This option sets the default E:D ratio at startup. Use `M905` to override this value. *
  462. * *
  463. * Example: `M905 W0.4 H0.2 D1.75`, where: *
  464. * - W is the extrusion width in mm *
  465. * - H is the layer height in mm *
  466. * - D is the filament diameter in mm *
  467. * *
  468. * Set to 0 to auto-detect the ratio based on given Gcode G1 print moves. *
  469. * *
  470. * Slic3r (including Prusa Slic3r) produces Gcode compatible with the automatic mode. *
  471. * Cura (as of this writing) may produce Gcode incompatible with the automatic mode. *
  472. * *
  473. * LIN ADVANCE is only compatible with Cartesian *
  474. * *
  475. *****************************************************************************************/
  476. //#define LIN_ADVANCE
  477.  
  478. #define LIN_ADVANCE_K 75
  479.  
  480. // The calculated ratio (or 0) according to the formula W * H / ((D / 2) ^ 2 * PI)
  481. // Example: 0.4 * 0.2 / ((1.75 / 2) ^ 2 * PI) = 0.033260135
  482. #define LIN_ADVANCE_E_D_RATIO 0
  483. /*****************************************************************************************/
  484.  
  485.  
  486. //===========================================================================
  487. //============================= MOTION FEATURES =============================
  488. //===========================================================================
  489.  
  490. /**************************************************************************
  491. *************************** Workspace offsets ****************************
  492. **************************************************************************
  493. * *
  494. * Enable this option for a leaner build of MK4duo that enable all *
  495. * workspace offsets, simplifying coordinate transformations, *
  496. * leveling, etc. *
  497. * *
  498. * - G92 *
  499. * - M206 and M428 are enabled. *
  500. **************************************************************************/
  501. //#define WORKSPACE_OFFSETS
  502. /**************************************************************************/
  503.  
  504.  
  505. /**************************************************************************
  506. *************************** Software endstops ****************************
  507. **************************************************************************/
  508. // If enabled, axis won't move to coordinates less than MIN POS.
  509. #define MIN_SOFTWARE_ENDSTOPS
  510. // If enabled, axis won't move to coordinates greater than MAX POS.
  511. #define MAX_SOFTWARE_ENDSTOPS
  512. /**************************************************************************/
  513.  
  514.  
  515. /**************************************************************************
  516. *********************** Endstops only for homing *************************
  517. **************************************************************************
  518. * *
  519. * If defined the endstops will only be used for homing *
  520. * *
  521. * If you use all six endstop enable ENABLE ALL SIX ENDSTOP *
  522. * *
  523. **************************************************************************/
  524. #define ENDSTOPS_ONLY_FOR_HOMING
  525. //#define ENABLED_ALL_SIX_ENDSTOP
  526. /**************************************************************************/
  527.  
  528.  
  529. /**************************************************************************
  530. ******************** Abort on endstop hit feature ************************
  531. **************************************************************************
  532. * *
  533. * This option allows you to abort printing when any endstop is triggered.*
  534. * This feature must be enabled with "M540 S1" or from the LCD menu or *
  535. * by define ABORT ON ENDSTOP HIT INIT true. *
  536. * To have any effect, endstops must be enabled during SD printing. *
  537. * With ENDSTOPS ONLY FOR HOMING you must send "M120" to enable endstops. *
  538. * *
  539. **************************************************************************/
  540. //#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
  541.  
  542. #define ABORT_ON_ENDSTOP_HIT_INIT true
  543. /**************************************************************************/
  544.  
  545.  
  546. /**************************************************************************
  547. ********************* G38.2 and G38.3 Probe Target ***********************
  548. **************************************************************************
  549. * *
  550. * Probe target - similar to G28 except it uses the Z_MIN endstop *
  551. * for all three axes *
  552. * *
  553. **************************************************************************/
  554. //#define G38_PROBE_TARGET
  555.  
  556. // minimum distance in mm that will produce a move
  557. // (determined using the print statement in check_move)
  558. #define G38_MINIMUM_MOVE 0.0275
  559. /**************************************************************************/
  560.  
  561.  
  562. /**************************************************************************
  563. ************************* Scad Mesh Output *******************************
  564. **************************************************************************
  565. * *
  566. * Enable if you prefer your output in JSON format *
  567. * suitable for SCAD or JavaScript mesh visualizers. *
  568. * *
  569. * Visualize meshes in OpenSCAD using the included script. *
  570. * *
  571. * scad/MK4duoMesh.scad *
  572. * *
  573. * By Scott Latherine @Thinkyhead *
  574. * *
  575. **************************************************************************/
  576. //#define SCAD_MESH_OUTPUT
  577. /**************************************************************************/
  578.  
  579.  
  580. /**************************************************************************
  581. ****************************** R/C Servo *********************************
  582. **************************************************************************/
  583. #define ENABLE_SERVOS
  584. // Number of servos
  585. // If you select a configuration below, this will receive a default value and does not need to be set manually
  586. // set it manually if you have more servos than extruders and wish to manually control some
  587. // leaving it defining as 0 will disable the servo subsystem
  588. #define NUM_SERVOS 0
  589. // Servo index starts with 0 for M280 command
  590. //
  591. // Servo deactivation
  592. // With this option servos are powered only during movement, then turned off to prevent jitter.
  593. //#define DEACTIVATE_SERVOS_AFTER_MOVE
  594.  
  595. // Delay (in milliseconds) before turning the servo off. This depends on the servo speed.
  596. // 300ms is a good value but you can try less delay.
  597. // If the servo can't reach the requested position, increase it.
  598. #define SERVO_DEACTIVATION_DELAY 300
  599. /**************************************************************************/
  600.  
  601.  
  602. /***********************************************************************
  603. *************************** Late Z axis *******************************
  604. ***********************************************************************
  605. * *
  606. * Enable Z the last moment. *
  607. * Needed if your Z driver overheats. *
  608. * *
  609. * This feature is not compatible with delta printer. *
  610. * *
  611. * Uncomment Z_LATE_ENABLE to enable this feature *
  612. * *
  613. ***********************************************************************/
  614. //#define Z_LATE_ENABLE
  615. /***********************************************************************/
  616.  
  617.  
  618. /***********************************************************************
  619. ************************* Ahead slowdown ******************************
  620. ***********************************************************************
  621. * *
  622. * The movements slow down when the look ahead buffer *
  623. * is only half full. *
  624. * *
  625. ***********************************************************************/
  626. #define SLOWDOWN
  627. /***********************************************************************/
  628.  
  629.  
  630. /***********************************************************************
  631. *************************** Quick home ********************************
  632. ***********************************************************************
  633. * *
  634. * If both x and y are to be homed, a diagonal move will *
  635. * be performed initially. *
  636. * *
  637. * This feature is not compatible with delta printer. *
  638. * This feature is enabled by default for scara printer. *
  639. * *
  640. ***********************************************************************/
  641. //#define QUICK_HOME
  642. /***********************************************************************/
  643.  
  644.  
  645. /***********************************************************************
  646. ************************* Home Y before X *****************************
  647. ***********************************************************************
  648. * *
  649. * When G28 is called, this option will make Y home before X *
  650. * *
  651. * This feature is not compatible with delta and scara printer. *
  652. * *
  653. ***********************************************************************/
  654. //#define HOME_Y_BEFORE_X
  655. /***********************************************************************/
  656.  
  657.  
  658. /***********************************************************************
  659. *********************** Force Home XY before Z ************************
  660. ***********************************************************************
  661. * *
  662. * When G28 is called, this option force XY home before Z *
  663. * *
  664. * This feature is not compatible with delta and scara printer. *
  665. * *
  666. ***********************************************************************/
  667. //#define FORCE_HOME_XY_BEFORE_Z
  668. /***********************************************************************/
  669.  
  670.  
  671. /**************************************************************************
  672. ***************************** Babystepping *******************************
  673. **************************************************************************
  674. * *
  675. * Babystepping enables movement of the axes by tiny increments without *
  676. * changing the current position values. This feature is used primarily *
  677. * to adjust the Z axis in the first layer of a print in real-time. *
  678. * *
  679. * Warning: Does not respect endstops! *
  680. * *
  681. **************************************************************************/
  682. //#define BABYSTEPPING
  683.  
  684. // Also enable X/Y Babystepping. Not supported on DELTA!
  685. //#define BABYSTEP_XY
  686.  
  687. // Change if Z babysteps should go the other way
  688. #define BABYSTEP_INVERT_Z false
  689. // Babysteps are very small. Increase for faster motion.
  690. #define BABYSTEP_MULTIPLICATOR 1
  691. // Enable to combine M851 and Babystepping
  692. //#define BABYSTEP_ZPROBE_OFFSET
  693. // Double-click on the Status Screen for Z Babystepping.
  694. //#define DOUBLECLICK_FOR_Z_BABYSTEPPING
  695. // Maximum interval between clicks, in milliseconds.
  696. // Note: Extra time may be added to mitigate controller latency.
  697. #define DOUBLECLICK_MAX_INTERVAL 1250
  698.  
  699. // Enable graphical overlay on Z-offset editor
  700. //#define BABYSTEP_ZPROBE_GFX_OVERLAY
  701. // Reverses the direction of the CW/CCW indicators
  702. //#define BABYSTEP_ZPROBE_GFX_REVERSE
  703. /**************************************************************************/
  704.  
  705.  
  706. /**************************************************************************
  707. *************************** Firmware retract *****************************
  708. **************************************************************************
  709. * *
  710. * Firmware based and LCD controlled retract *
  711. * *
  712. * Add G10 / G11 commands for automatic firmware-based retract / recover. *
  713. * Use M207 and M208 to define parameters for retract / recover. *
  714. * *
  715. * Use M209 to enable or disable auto-retract. *
  716. * With auto-retract enabled, all G1 E moves over the MIN_RETRACT length *
  717. * will be converted to firmware-based retract/recover moves. *
  718. * *
  719. * Be sure to turn off auto-retract during filament change. *
  720. * *
  721. * Note that M207 / M208 / M209 settings are saved to EEPROM. *
  722. * *
  723. **************************************************************************/
  724. //#define FWRETRACT // ONLY PARTIALLY TESTED
  725.  
  726. #define MIN_AUTORETRACT 0.1 // When auto-retract is on, convert E moves of this length and over
  727. #define MAX_AUTORETRACT 10.0 // Upper limit for auto-retract conversion
  728. #define RETRACT_LENGTH 3 // Default retract length (positive mm)
  729. #define RETRACT_LENGTH_SWAP 13 // Default swap retract length (positive mm), for extruder change
  730. #define RETRACT_FEEDRATE 45 // Default feedrate for retracting (mm/s)
  731. #define RETRACT_ZLIFT 0 // Default retract Z-lift
  732. #define RETRACT_RECOVER_LENGTH 0 // Default additional recover length (mm, added to retract length when recovering)
  733. #define RETRACT_RECOVER_LENGTH_SWAP 0 // Default additional swap recover length (mm, added to retract length when recovering from extruder change)
  734. #define RETRACT_RECOVER_FEEDRATE 8 // Default feedrate for recovering from retraction (mm/s)
  735. #define RETRACT_RECOVER_FEEDRATE_SWAP 8 // Default feedrate for recovering from swap retraction (mm/s)
  736. /**************************************************************************/
  737.  
  738.  
  739. /*****************************************************************************************
  740. ************************************ Dual X-carriage ************************************
  741. *****************************************************************************************
  742. * *
  743. * A dual x-carriage design has the advantage that the inactive extruder can be parked *
  744. * which prevents hot-end ooze contaminating the print. It also reduces the weight of *
  745. * each x-carriage allowing faster printing speeds. *
  746. * *
  747. *****************************************************************************************/
  748. //#define DUAL_X_CARRIAGE
  749.  
  750. // Configuration for second X-carriage
  751. // Note: the first x-carriage is defined as the x-carriage which homes to the minimum endstop;
  752. // the second x-carriage always homes to the maximum endstop.
  753. #define X2_MIN_POS 80 // set minimum to ensure second x-carriage doesn't hit the parked first X-carriage
  754. #define X2_MAX_POS 353 // set maximum to the distance between toolheads when both heads are homed
  755. #define X2_HOME_DIR 1 // the second X-carriage always homes to the maximum endstop position
  756. #define X2_HOME_POS X2_MAX_POS // default home position is the maximum carriage position
  757. // However: In this mode the HOTEND_OFFSET_X value for the second extruder provides a software
  758. // override for X2_HOME_POS. This also allow recalibration of the distance between the two endstops
  759. // without modifying the firmware (through the "M218 T1 X???" command).
  760. // Remember: you should set the second extruder x-offset to 0 in your slicer.
  761.  
  762. // There are a few selectable movement modes for dual x-carriages using M605 S<mode>
  763. // Mode 0 (DXC_FULL_CONTROL_MODE): Full control. The slicer has full control over both x-carriages and can achieve optimal travel results
  764. // as long as it supports dual x-carriages. (M605 S0)
  765. // Mode 1 (DXC_AUTO_PARK_MODE) : Auto-park mode. The firmware will automatically park and unpark the x-carriages on tool changes so
  766. // that additional slicer support is not required. (M605 S1)
  767. // Mode 2 (DXC_DUPLICATION_MODE) : Duplication mode. The firmware will transparently make the second x-carriage and extruder copy all
  768. // actions of the first x-carriage. This allows the printer to print 2 arbitrary items at
  769. // once. (2nd extruder x offset and temp offset are set using: M605 S2 [Xnnn] [Rmmm])
  770.  
  771. // This is the default power-up mode which can be later using M605.
  772. #define DEFAULT_DUAL_X_CARRIAGE_MODE DXC_FULL_CONTROL_MODE
  773.  
  774. // Default settings in "Auto-park Mode"
  775. #define TOOLCHANGE_PARK_ZLIFT 0.2 // the distance to raise Z axis when parking an extruder
  776. #define TOOLCHANGE_UNPARK_ZLIFT 1 // the distance to raise Z axis when unparking an extruder
  777.  
  778. // Default x offset in duplication mode (typically set to half print bed width)
  779. #define DEFAULT_DUPLICATION_X_OFFSET 100
  780. /*****************************************************************************************/
  781.  
  782.  
  783. /*****************************************************************************************
  784. ********************************** X-axis two driver ************************************
  785. *****************************************************************************************
  786. * *
  787. * A single X stepper driver is usually used to drive 2 stepper motors. *
  788. * Uncomment this define to utilize a separate stepper driver for each X axis motor. *
  789. * *
  790. *****************************************************************************************/
  791. //#define X_TWO_STEPPER
  792.  
  793. // Define if the two X drives need to rotate in opposite directions
  794. #define INVERT_X2_VS_X_DIR false
  795. /*****************************************************************************************/
  796.  
  797.  
  798. /*****************************************************************************************
  799. ********************************** Y-axis two driver ************************************
  800. *****************************************************************************************
  801. * *
  802. * A single Y stepper driver is usually used to drive 2 stepper motors. *
  803. * Uncomment this define to utilize a separate stepper driver for each Y axis motor. *
  804. * *
  805. *****************************************************************************************/
  806. //#define Y_TWO_STEPPER
  807.  
  808. // Define if the two Y drives need to rotate in opposite directions
  809. #define INVERT_Y2_VS_Y_DIR false
  810. /*****************************************************************************************/
  811.  
  812.  
  813. /*****************************************************************************************
  814. ************************** Z-axis two - three - four driver ****************************
  815. *****************************************************************************************
  816. * *
  817. * A single Z stepper driver is usually used to drive 2 stepper motors. *
  818. * Uncomment this define to utilize a separate stepper driver for each Z axis motor. *
  819. * *
  820. *****************************************************************************************/
  821. //#define Z_TWO_STEPPER
  822. //#define Z_THREE_STEPPER
  823. //#define Z_FOUR_STEPPER
  824.  
  825. // Define directions of the Z2, Z3 and Z4 drives (if they're enabled) relative to the Z
  826. // drive direction
  827. #define INVERT_Z2_VS_Z_DIR false
  828. #define INVERT_Z3_VS_Z_DIR false
  829. #define INVERT_Z4_VS_Z_DIR false
  830.  
  831. // Z TWO ENDSTOPS is a feature to enable the use of 2 endstops for both Z steppers
  832. //#define Z_TWO_ENDSTOPS
  833. // Z THREE ENDSTOPS is a feature to enable the use of 3 endstops for three Z steppers
  834. //#define Z_THREE_ENDSTOPS
  835. // Z FOUR ENDSTOPS is a feature to enable the use of 4 endstops for four Z steppers
  836. //#define Z_FOUR_ENDSTOPS
  837. /*****************************************************************************************/
  838.  
  839.  
  840. /*****************************************************************************************
  841. ********************************** XY Frequency limit ***********************************
  842. *****************************************************************************************
  843. * *
  844. * See nophead's blog for more info. *
  845. * Not working O *
  846. * *
  847. *****************************************************************************************/
  848. //#define XY_FREQUENCY_LIMIT 15
  849. /*****************************************************************************************/
  850.  
  851.  
  852. /*****************************************************************************************
  853. ********************************** Skeinforge arc fix ***********************************
  854. *****************************************************************************************
  855. * *
  856. * SF send wrong arc g-codes when using Arc Point as fillet procedure. *
  857. * *
  858. *****************************************************************************************/
  859. //#define SF_ARC_FIX
  860. /*****************************************************************************************/
  861.  
  862.  
  863. //===========================================================================
  864. //============================= SENSORS FEATURES ============================
  865. //===========================================================================
  866.  
  867.  
  868. /**********************************************************************************
  869. *************************** Extruder Encoder Control *****************************
  870. **********************************************************************************
  871. * *
  872. * Support for Encoder on extruder for control filament movement *
  873. * EXPERIMENTAL Function *
  874. * *
  875. * You can compare filament moves with extruder moves to detect if the extruder *
  876. * is jamming, the spool is knotted or if you are running out of filament. *
  877. * You need a movement tracker, that changes a digital signal every x extrusion *
  878. * steps. *
  879. * *
  880. * Please define/ Encoder pin for any extruder in configuration pins. *
  881. * *
  882. **********************************************************************************/
  883. //#define EXTRUDER_ENCODER_CONTROL
  884.  
  885. // Enc error step is step for error detect
  886. #define ENC_ERROR_STEPS 500
  887. // Enc min step It must be the minimum number of steps that the extruder does
  888. // to get a signal from the encoder
  889. #define ENC_MIN_STEPS 10
  890. // For invert read signal
  891. //#define INVERTED_ENCODER_PINS
  892. /**********************************************************************************/
  893.  
  894.  
  895. /**********************************************************************************
  896. *************************** Filament diameter sensor *****************************
  897. **********************************************************************************
  898. * *
  899. * Support for a filament diameter sensor *
  900. * Also allows adjustment of diameter at print time (vs at slicing) *
  901. * Single extruder only at this point (extruder 0) *
  902. * *
  903. * You also need to set FILWIDTH_PIN in Configuration_pins.h *
  904. * *
  905. **********************************************************************************/
  906. //#define FILAMENT_SENSOR
  907.  
  908. #define FILAMENT_SENSOR_EXTRUDER_NUM 0 // Index of the extruder that has the filament sensor. :[0,1,2,3,4,5]
  909. #define MEASUREMENT_DELAY_CM 14 // (cm) The distance from the filament sensor to the melting chamber
  910.  
  911. #define FILWIDTH_ERROR_MARGIN 1.0 // (mm) If a measurement differs too much from nominal width ignore it
  912. #define MAX_MEASUREMENT_DELAY 20 // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
  913.  
  914. #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA //set measured to nominal initially
  915.  
  916. //When using an LCD, uncomment the line below to display the Filament sensor data on the last line instead of status. Status will appear for 5 sec.
  917. //#define FILAMENT_LCD_DISPLAY
  918. /**********************************************************************************/
  919.  
  920.  
  921. /**********************************************************************************
  922. **************************** Filament Runout sensor ******************************
  923. **********************************************************************************
  924. * *
  925. * Filament runout sensor such as a mechanical or opto endstop to check the *
  926. * existence of filament *
  927. * By default the firmware assumes *
  928. * logic high = filament available *
  929. * low = filament run out *
  930. * Single extruder only at this point (extruder 0) *
  931. * *
  932. * If you mount DAV system encoder filament runout (By D'angella Vincenzo) *
  933. * define FILAMENT RUNOUT DAV SYSTEM *
  934. * Put DAV_PIN for encoder input in Configuration_Pins.h *
  935. * *
  936. * You also need to set FIL RUNOUT PIN in Configuration_pins.h *
  937. * *
  938. **********************************************************************************/
  939. //#define FILAMENT_RUNOUT_SENSOR
  940.  
  941. // DAV system ancoder filament runout
  942. //#define FILAMENT_RUNOUT_DAV_SYSTEM
  943.  
  944. // Set true or false should assigned
  945. #define FIL_RUNOUT_PIN_INVERTING true
  946. // Uncomment to use internal pullup for pin if the sensor is defined
  947. //#define ENDSTOPPULLUP_FIL_RUNOUT
  948. // Time for double check switch in millisecond. Set 0 for disabled
  949. #define FILAMENT_RUNOUT_DOUBLE_CHECK 0
  950. // Script execute when filament run out
  951. #define FILAMENT_RUNOUT_SCRIPT "M600"
  952. /**********************************************************************************/
  953.  
  954.  
  955. /**************************************************************************
  956. *********************** Power consumption sensor *************************
  957. **************************************************************************
  958. * *
  959. * Support for a current sensor (Hall effect sensor like ACS712) for *
  960. * measure the power consumption. Since it's more simple to deal with, *
  961. * we measure the DC current and we assume that POWER_VOLTAGE that comes *
  962. * from your power supply it's almost stable. *
  963. * You have to change the POWER_SENSITIVITY with the one that you can *
  964. * find in the datasheet. (in case of ACS712: set to .100 for 20A version *
  965. * or set .066 for 30A version). *
  966. * *
  967. * After setted POWER_VOLTAGE and POWER_SENSITIVITY you have to found *
  968. * correct value for POWER_ZERO. *
  969. * You can do it by using "M70 Z" gcode and read the calculated value *
  970. * from serial messages. *
  971. * Before calling "M70 Z" you have to disconnect the cable for measure *
  972. * the current from the sensor leaving only +5, OUT and GND connections. *
  973. * Insert new values into FW and recompile. *
  974. * Now you can reconnect the current cable to the sensor. *
  975. * *
  976. * Now you have to set right value for POWER_ERROR. *
  977. * Get a good multimeter and meacure DC current coming out from the *
  978. * power supply. *
  979. * In order to get an accurate value power-on something *
  980. * (Eg. Heater, Motor, Fan) DO NOT POWER-ON THE BED OR YOU MAY KILL IT! *
  981. * Call "M70 Ax" where 'x' is the value measured by the multimeter. *
  982. * Insert new values into FW and recompile. *
  983. * *
  984. * With this module we measure the Printer power consumption ignoring *
  985. * the Power Supply power consumption, *
  986. * so we consider the POWER_EFFICIENCY of our supply to be 100%. *
  987. * WARNING: from this moment the procedure can be REALLY HARMFUL to *
  988. * health unless you have a little experience so: *
  989. * DO NOT DO IT IF YOU DO NOT KNOW WHAT YOU ARE DOING!!! *
  990. * If you want to approximately add the supply consumption you have *
  991. * measure the AC current with a good multimeter and moltiple it with the *
  992. * mains voltage (110V AC - 220V AC). *
  993. * MULTIMETER_WATT = MULTIMETER_CURRENT * MAINS_VOLTAGE *
  994. * Call "M70 Wx" where 'x' is MULTIMETER_WATT; *
  995. * Insert new values into FW and recompile. *
  996. * *
  997. * Now you AC712 it should be calibrated. *
  998. * *
  999. * You also need to set POWER_CONSUMPTION_PIN in pins.h *
  1000. * *
  1001. **************************************************************************/
  1002. //#define POWER_CONSUMPTION
  1003.  
  1004. #define POWER_VOLTAGE 12.00 //(V) The power supply OUT voltage
  1005. #define POWER_SENSITIVITY 0.066 //(V/A) How much increase V for 1A of increase
  1006. #define POWER_OFFSET 0.005 //(A) Help to get 0A when no load is connected.
  1007. #define POWER_ZERO 2.500 //(V) The /\V coming out from the sensor when no current flow.
  1008. #define POWER_ERROR 0.0 //(%) Ammortize measure error.
  1009. #define POWER_EFFICIENCY 100.0 //(%) The power efficency of the power supply
  1010.  
  1011. //When using an LCD, uncomment the line below to display the Power consumption sensor data on the last line instead of status. Status will appear for 5 sec.
  1012. //#define POWER_CONSUMPTION_LCD_DISPLAY
  1013. /**************************************************************************/
  1014.  
  1015.  
  1016. /**************************************************************************
  1017. ****************************** Flow sensor *******************************
  1018. **************************************************************************
  1019. * *
  1020. * Flow sensors for water circulators, usefull in case of coolers using *
  1021. * water or other liquid as heat vector *
  1022. * *
  1023. * You also need to set FLOWMETER PIN in Configurations_pins.h *
  1024. * *
  1025. **************************************************************************/
  1026. //#define FLOWMETER_SENSOR
  1027.  
  1028. #define FLOWMETER_MAXFLOW 6.0 // Liters per minute max
  1029. #define FLOWMETER_MAXFREQ 55 // frequency of pulses at max flow
  1030.  
  1031. // uncomment this to kill print job under the min flow rate, in liters/minute
  1032. //#define MINFLOW_PROTECTION 4
  1033. /**************************************************************************/
  1034.  
  1035.  
  1036. /**************************************************************************
  1037. ************************** Door open sensor ******************************
  1038. **************************************************************************
  1039. * *
  1040. * A triggered door will prevent new commands from serial or sd card. *
  1041. * Setting DOOR PIN in Configuration_Pins.h *
  1042. * *
  1043. **************************************************************************/
  1044. //#define DOOR_OPEN
  1045.  
  1046. // Set true or false should assigned
  1047. #define DOOR_OPEN_LOGIC false
  1048. // Uncomment to use internal pullup for pin if the sensor is defined.
  1049. //#define DOOR_OPEN_PULLUP
  1050. /**************************************************************************/
  1051.  
  1052.  
  1053. /**************************************************************************
  1054. ***************************** Power Check ********************************
  1055. **************************************************************************
  1056. * *
  1057. * A triggered when the pin detects lack of voltage *
  1058. * Setting POWER CHECK PIN in Configuration_Pins.h *
  1059. * *
  1060. **************************************************************************/
  1061. //#define POWER_CHECK
  1062.  
  1063. // Set true or false should assigned
  1064. #define POWER_CHECK_LOGIC false
  1065. // Uncomment to use internal pullup for pin if the sensor is defined.
  1066. //#define POWER_CHECK_PULLUP
  1067. /**************************************************************************/
  1068.  
  1069.  
  1070. //===========================================================================
  1071. //============================= ADDON FEATURES ==============================
  1072. //===========================================================================
  1073.  
  1074. /************************************************************************************************************************
  1075. ***************************************************** EEPROM ***********************************************************
  1076. ************************************************************************************************************************
  1077. * *
  1078. * The microcontroller can store settings in the EEPROM, e.g. max velocity... *
  1079. * M500 - Stores parameters in EEPROM *
  1080. * M501 - Reads parameters from EEPROM (if you need reset them after you changed them temporarily). *
  1081. * M502 - Reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to. *
  1082. * M503 - Print parameters on host *
  1083. * *
  1084. * Uncomment EEPROM SETTINGS to enable this feature. *
  1085. * Uncomment EEPROM CHITCHAT to enable EEPROM Serial responses. *
  1086. * Uncomment EEPROM SD for use writing EEPROM on SD *
  1087. * Uncomment EEPROM FLASH for use writing EEPROM on Flash Memory (Only for DUE) *
  1088. * *
  1089. ************************************************************************************************************************/
  1090. //#define EEPROM_SETTINGS
  1091.  
  1092. //#define EEPROM_CHITCHAT // Uncomment this to enable EEPROM Serial responses.
  1093. //#define EEPROM_SD
  1094. //#define EEPROM_FLASH
  1095. //#define DISABLE_M503
  1096. /************************************************************************************************************************/
  1097.  
  1098.  
  1099. /*****************************************************************************************
  1100. *************************************** SDCARD *******************************************
  1101. ****************************************************************************************/
  1102. //#define SDSUPPORT
  1103.  
  1104. //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
  1105. //#define SDEXTRASLOW // Use even slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
  1106. //#define SD_CHECK_AND_RETRY // Use CRC checks and retries on the SD communication
  1107. //#define SD_EXTENDED_DIR // Show extended directory including file length. Don't use this with Pronterface
  1108.  
  1109. // Decomment this if you have external SD without DETECT_PIN
  1110. //#define SD_DISABLED_DETECT
  1111. // Some RAMPS and other boards don't detect when an SD card is inserted. You can work
  1112. // around this by connecting a push button or single throw switch to the pin defined
  1113. // as SD_DETECT_PIN in your board's pins definitions.
  1114. // This setting should be disabled unless you are using a push button, pulling the pin to ground.
  1115. // Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
  1116. //#define SD_DETECT_INVERTED
  1117.  
  1118. #define SD_FINISHED_STEPPERRELEASE true // if sd support and the file is finished: disable steppers?
  1119. #define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the z enabled so your bed stays in place.
  1120.  
  1121. //#define MENU_ADDAUTOSTART
  1122.  
  1123. // Enable this option to scroll long filenames in the SD card menu
  1124. //#define SCROLL_LONG_FILENAMES
  1125.  
  1126. /**
  1127. * Sort SD file listings in alphabetical order.
  1128. *
  1129. * With this option enabled, items on SD cards will be sorted
  1130. * by name for easier navigation.
  1131. *
  1132. * By default...
  1133. *
  1134. * - Use the slowest -but safest- method for sorting.
  1135. * - Folders are sorted to the top.
  1136. * - The sort key is statically allocated.
  1137. * - No added G-code (M36) support.
  1138. * - 40 item sorting limit. (Items after the first 40 are unsorted.)
  1139. *
  1140. * SD sorting uses static allocation (as set by SDSORT_LIMIT), allowing the
  1141. * compiler to calculate the worst-case usage and throw an error if the SRAM
  1142. * limit is exceeded.
  1143. *
  1144. * - SDSORT_USES_RAM provides faster sorting via a static directory buffer.
  1145. * - SDSORT_USES_STACK does the same, but uses a local stack-based buffer.
  1146. * - SDSORT_CACHE_NAMES will retain the sorted file listing in RAM. (Expensive!)
  1147. * - SDSORT_DYNAMIC_RAM only uses RAM when the SD menu is visible. (Use with caution!)
  1148. */
  1149. //#define SDCARD_SORT_ALPHA
  1150.  
  1151. // SD Card Sorting options
  1152. #define SDSORT_LIMIT 40 // Maximum number of sorted items (10-256). Costs 27 bytes each.
  1153. #define FOLDER_SORTING -1 // -1=above 0=none 1=below
  1154. #define SDSORT_GCODE false // Allow turning sorting on/off with LCD and M36 g-code.
  1155. #define SDSORT_USES_RAM false // Pre-allocate a static array for faster pre-sorting.
  1156. #define SDSORT_USES_STACK false // Prefer the stack for pre-sorting to give back some SRAM. (Negated by next 2 options.)
  1157. #define SDSORT_CACHE_NAMES false // Keep sorted items in RAM longer for speedy performance. Most expensive option.
  1158. #define SDSORT_DYNAMIC_RAM false // Use dynamic allocation (within SD menus). Least expensive option. Set SDSORT_LIMIT before use!
  1159. #define SDSORT_CACHE_VFATS 2 // Maximum number of 13-byte VFAT entries to use for sorting.
  1160. // Note: Only affects SCROLL_LONG_FILENAMES with SDSORT_CACHE_NAMES but not SDSORT_DYNAMIC_RAM.
  1161.  
  1162. // This enable the firmware to write some configuration that require frequent update, on the SD card
  1163. //#define SD_SETTINGS // Uncomment to enable
  1164. #define SD_CFG_SECONDS 300 // seconds between update
  1165. /*****************************************************************************************/
  1166.  
  1167.  
  1168. /*****************************************************************************************
  1169. *********************************** LCD Language ****************************************
  1170. *****************************************************************************************
  1171. * *
  1172. * Here you may choose the language used by MK4duo on the LCD menus, *
  1173. * the following list of languages are available: *
  1174. * en, an, bg, ca, cn, cz, cz_utf8, de, el, el-gr, es, eu, fi, fr, gl, hr, it, *
  1175. * kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, zh_CN, zh_TW *
  1176. * *
  1177. * 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', *
  1178. * 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', *
  1179. * 'el-gr':'Greek (Greece)' 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', *
  1180. * 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', *
  1181. * 'kana':'Japanese', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', *
  1182. * 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'hu':'Hungarian', *
  1183. * 'cz_utf8':'Czech (UTF8)' *
  1184. * 'kana_utf8':'Japanese (UTF8)' *
  1185. * 'pt_utf8':'Portuguese (UTF8)' *
  1186. * 'pt-br':'Portuguese (Brazilian)' *
  1187. * 'pt-br_utf8':'Portuguese (Brazilian UTF8)' *
  1188. * *
  1189. *****************************************************************************************/
  1190. #define LCD_LANGUAGE en
  1191. /*****************************************************************************************/
  1192.  
  1193.  
  1194. /***********************************************************************
  1195. ******************************* LCD ***********************************
  1196. ***********************************************************************/
  1197.  
  1198. // LCD Character Set
  1199. //
  1200. // Note: This option is NOT applicable to Graphical Displays.
  1201. //
  1202. // All character-based LCD's provide ASCII plus one of these
  1203. // language extensions:
  1204. //
  1205. // - JAPANESE ... the most common
  1206. // - WESTERN ... with more accented characters
  1207. // - CYRILLIC ... for the Russian language
  1208. //
  1209. // To determine the language extension installed on your controller:
  1210. //
  1211. // - Compile and upload with LCD_LANGUAGE set to 'test'
  1212. // - Click the controller to view the LCD menu
  1213. // - The LCD will display Japanese, Western, or Cyrillic text
  1214. //
  1215. // :['JAPANESE', 'WESTERN', 'CYRILLIC']
  1216. //
  1217. #define DISPLAY_CHARSET_HD44780 JAPANESE
  1218.  
  1219. #define SHOW_BOOTSCREEN
  1220. //#define SHOW_CUSTOM_BOOTSCREEN
  1221. #define STRING_SPLASH_LINE1 "v" SHORT_BUILD_VERSION // will be shown during bootup in line 1
  1222. #define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
  1223. #define BOOTSCREEN_TIMEOUT 2500
  1224.  
  1225. // LCD TYPE
  1226. //
  1227. // You may choose ULTRA_LCD if you have character based LCD with 16x2, 16x4, 20x2,
  1228. // 20x4 char/lines or DOGLCD for the full graphics display with 128x64 pixels
  1229. // (ST7565R family). (This option will be set automatically for certain displays.)
  1230. //
  1231. // IMPORTANT NOTE: The U8glib library is required for Full Graphic Display!
  1232. // https://github.com/olikraus/U8glib_Arduino
  1233. //
  1234. //#define ULTRA_LCD // Character based
  1235. //#define DOGLCD // Full graphics display
  1236.  
  1237.  
  1238. // Additional options for Graphical Displays
  1239. //
  1240. // Use the optimizations here to improve printing performance,
  1241. // which can be adversely affected by graphical display drawing,
  1242. // especially when doing several short moves, and when printing
  1243. // on DELTA and SCARA machines.
  1244. //
  1245. // Some of these options may result in the display lagging behind
  1246. // controller events, as there is a trade-off between reliable
  1247. // printing performance versus fast display updates.
  1248.  
  1249. // Enable to save many cycles by drawing a hollow frame on the Info Screen
  1250. #define XYZ_HOLLOW_FRAME
  1251.  
  1252. // Enable to save many cycles by drawing a hollow frame on Menu Screens
  1253. #define MENU_HOLLOW_FRAME
  1254.  
  1255. // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM.
  1256. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
  1257. //#define USE_BIG_EDIT_FONT
  1258.  
  1259. // A smaller font may be used on the Info Screen. Costs 2300 bytes of PROGMEM.
  1260. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
  1261. //#define USE_SMALL_INFOFONT
  1262.  
  1263. // Enable this option and reduce the value to optimize screen updates.
  1264. // The normal delay is 10µs. Use the lowest value that still gives a reliable display.
  1265. //#define DOGM_SPI_DELAY_US 5
  1266.  
  1267. // Swap the CW/CCW indicators in the graphics overlay
  1268. //#define OVERLAY_GFX_REVERSE
  1269.  
  1270. // ENCODER SETTINGS
  1271.  
  1272. // This option overrides the default number of encoder pulses needed to
  1273. // produce one step. Should be increased for high-resolution encoders.
  1274. //#define ENCODER_PULSES_PER_STEP 1
  1275.  
  1276. // Use this option to override the number of step signals required to
  1277. // move between next/prev menu items.
  1278. //#define ENCODER_STEPS_PER_MENU_ITEM 5
  1279.  
  1280. //#define LCD_SCREEN_ROT_90 // Rotate screen orientation for graphics display by 90 degree clockwise
  1281. //#define LCD_SCREEN_ROT_180 // Rotate screen orientation for graphics display by 180 degree clockwise
  1282. //#define LCD_SCREEN_ROT_270 // Rotate screen orientation for graphics display by 270 degree clockwise
  1283.  
  1284. //#define INVERT_CLICK_BUTTON // Option for invert encoder button logic
  1285. //#define INVERT_BACK_BUTTON // Option for invert back button logic if avaible
  1286.  
  1287. // Encoder Direction Options
  1288. // Test your encoder's behavior first with both options disabled.
  1289. //
  1290. // Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
  1291. // Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION.
  1292. // Reversed Value Editing only? Enable BOTH options.
  1293.  
  1294. // This option reverses the encoder direction everywhere
  1295. // Set this option if CLOCKWISE causes values to DECREASE
  1296. //#define REVERSE_ENCODER_DIRECTION
  1297.  
  1298. // This option reverses the encoder direction for navigating LCD menus.
  1299. // If CLOCKWISE normally moves DOWN this makes it go UP.
  1300. // If CLOCKWISE normally moves UP this makes it go DOWN.
  1301. //#define REVERSE_MENU_DIRECTION
  1302.  
  1303. #define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
  1304. #define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
  1305. #define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
  1306.  
  1307. // Double-click the Encoder button on the Status Screen for Z Babystepping.
  1308. //#define DOUBLECLICK_FOR_Z_BABYSTEPPING
  1309. // Maximum interval between clicks, in milliseconds.
  1310. // Note: You may need to add extra time to mitigate controller latency.
  1311. #define DOUBLECLICK_MAX_INTERVAL 1250
  1312.  
  1313. // Comment to disable setting feedrate multiplier via encoder
  1314. #define ULTIPANEL_FEEDMULTIPLY
  1315.  
  1316. // SPEAKER/BUZZER
  1317. // If you have a speaker that can produce tones, enable it here.
  1318. // By default Marlin assumes you have a buzzer with a fixed frequency.
  1319. //#define SPEAKER
  1320.  
  1321. // The duration and frequency for the UI feedback sound.
  1322. // Set these to 0 to disable audio feedback in the LCD menus.
  1323.  
  1324. // Note: Test audio output with the G-Code:
  1325. // M300 S<frequency Hz> P<duration ms>
  1326. //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
  1327. //#define LCD_FEEDBACK_FREQUENCY_HZ 5000
  1328.  
  1329. //Display Voltage Logic Selector on Alligator Board
  1330. //#define UI_VOLTAGE_LEVEL 0 // 3.3 V
  1331. #define UI_VOLTAGE_LEVEL 1 // 5 V
  1332.  
  1333. // Include a page of printer information in the LCD Main Menu
  1334. #define LCD_INFO_MENU
  1335.  
  1336. // Scroll a longer status message into view
  1337. //#define STATUS_MESSAGE_SCROLLING
  1338.  
  1339. // On the Info Screen, display XY with one decimal place when possible
  1340. //#define LCD_DECIMAL_SMALL_XY
  1341.  
  1342. // The timeout (in ms) to return to the status screen from sub-menus
  1343. //#define LCD_TIMEOUT_TO_STATUS 15000
  1344.  
  1345. // LED Control Menu
  1346. // Enable this feature to add LED Control to the LCD menu
  1347. //#define LED_CONTROL_MENU
  1348. //#define LED_COLOR_PRESETS // Enable the Preset Color menu option
  1349. //#define LED_USER_PRESET_STARTUP // Have the printer display the user preset color on startup
  1350. #define LED_USER_PRESET_RED 255 // User defined RED value
  1351. #define LED_USER_PRESET_GREEN 255 // User defined GREEN value
  1352. #define LED_USER_PRESET_BLUE 255 // User defined BLUE value
  1353. #define LED_USER_PRESET_WHITE 255 // User defined WHITE value
  1354. #define LED_USER_PRESET_BRIGHTNESS 255 // User defined intensity
  1355.  
  1356. // CONTROLLER TYPE: Standard
  1357.  
  1358. // MK4duo supports a wide variety of controllers.
  1359. // Enable one of the following options to specify your controller.
  1360.  
  1361. // ULTIMAKER Controller.
  1362. //#define ULTIMAKERCONTROLLER
  1363.  
  1364. // ULTIPANEL as seen on Thingiverse.
  1365. //#define ULTIPANEL
  1366.  
  1367. // Cartesio UI
  1368. // http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
  1369. //
  1370. //#define CARTESIO_UI
  1371.  
  1372. // Original RADDS Display from Willy
  1373. // http://max3dshop.org/index.php/default/elektronik/radds-lcd-sd-display-with-reset-and-back-buttom.html
  1374. //#define RADDS_DISPLAY
  1375.  
  1376. // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
  1377. // http://reprap.org/wiki/PanelOne
  1378. //
  1379. //#define PANEL_ONE
  1380.  
  1381. // MaKr3d Makr-Panel with graphic controller and SD support.
  1382. // http://reprap.org/wiki/MaKr3d_MaKrPanel
  1383. //
  1384. //#define MAKRPANEL
  1385.  
  1386. // ReprapWorld Graphical LCD
  1387. // https://reprapworld.com/?products_details&products_id/1218
  1388. //
  1389. //#define REPRAPWORLD_GRAPHICAL_LCD
  1390.  
  1391. // Activate one of these if you have a Panucatt Devices
  1392. // Viki 2.0 or mini Viki with Graphic LCD
  1393. // http://panucatt.com
  1394. //
  1395. //#define VIKI2
  1396. //#define miniVIKI
  1397.  
  1398. // Adafruit ST7565 Full Graphic Controller.
  1399. // https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
  1400. //
  1401. //#define ELB_FULL_GRAPHIC_CONTROLLER
  1402.  
  1403. // RepRapDiscount Smart Controller.
  1404. // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
  1405. //
  1406. // Note: Usually sold with a white PCB.
  1407. //
  1408. //#define REPRAP_DISCOUNT_SMART_CONTROLLER
  1409.  
  1410. // GADGETS3D G3D LCD/SD Controller
  1411. // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
  1412. //
  1413. // Note: Usually sold with a blue PCB.
  1414. //
  1415. //#define G3D_PANEL
  1416.  
  1417. // RepRapDiscount FULL GRAPHIC Smart Controller
  1418. // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
  1419. //
  1420. //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
  1421.  
  1422. // MakerLab Mini Panel with graphic
  1423. // controller and SD support - http://reprap.org/wiki/Mini_panel
  1424. //
  1425. //#define MINIPANEL
  1426.  
  1427. // RepRapWorld REPRAPWORLD_KEYPAD v1.1
  1428. // http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
  1429. //
  1430. // REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
  1431. // is pressed, a value of 10.0 means 10mm per click.
  1432. //
  1433. //#define REPRAPWORLD_KEYPAD
  1434. //#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
  1435.  
  1436. // RigidBot Panel V1.0
  1437. // http://www.inventapart.com/
  1438. //
  1439. //#define RIGIDBOT_PANEL
  1440.  
  1441. // BQ LCD Smart Controller shipped by
  1442. // default with the BQ Hephestos 2 and Witbox 2.
  1443. //
  1444. //#define BQ_LCD_SMART_CONTROLLER
  1445.  
  1446. // CONTROLLER TYPE: I2C
  1447. //
  1448. // Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
  1449. // library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
  1450.  
  1451. // Elefu RA Board Control Panel
  1452. // http://www.elefu.com/index.php?route=product/product&product_id=53
  1453. //
  1454. //#define RA_CONTROL_PANEL
  1455.  
  1456. // Sainsmart YW Robot (LCM1602) LCD Display
  1457. //
  1458. //#define LCD_I2C_SAINSMART_YWROBOT
  1459.  
  1460. // Generic LCM1602 LCD adapter
  1461. //
  1462. //#define LCM1602
  1463.  
  1464. // PANELOLU2 LCD with status LEDs,
  1465. // separate encoder and click inputs.
  1466. //
  1467. // Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
  1468. // For more info: https://github.com/lincomatic/LiquidTWI2
  1469. //
  1470. // Note: The PANELOLU2 encoder click input can either be directly connected to
  1471. // a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
  1472. //
  1473. //#define LCD_I2C_PANELOLU2
  1474.  
  1475. // Panucatt VIKI LCD with status LEDs,
  1476. // integrated click & L/R/U/D buttons, separate encoder inputs.
  1477. //
  1478. //#define LCD_I2C_VIKI
  1479.  
  1480. // SSD1306 OLED full graphics generic display
  1481. //
  1482. //#define U8GLIB_SSD1306
  1483.  
  1484. // WANHAO D6 SSD1309 OLED full graphics
  1485. //
  1486. //#define WANHAO_D6_OLED
  1487.  
  1488. // SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
  1489. //
  1490. //#define SAV_3DGLCD
  1491.  
  1492. //
  1493. // ANET and Tronxy Controller supported displays.
  1494. //
  1495. //#define ZONESTAR_LCD // Requires ADC_KEYPAD_PIN to be assigned to an analog pin.
  1496. // This LCD is known to be susceptible to electrical interference
  1497. // which scrambles the display. Pressing any button clears it up.
  1498. // This is a LCD2004 display with 5 analog buttons.
  1499.  
  1500. //#define ANET_FULL_GRAPHICS_LCD // Anet 128x64 full graphics lcd with rotary encoder as used on Anet A6
  1501. // A clone of the RepRapDiscount full graphics display but with
  1502. // different pins/wiring (see pins_ANET_10.h).
  1503.  
  1504. // CONTROLLER TYPE: Shift register panels
  1505. //
  1506. // 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
  1507. // LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
  1508. //
  1509. //#define SAV_3DLCD
  1510.  
  1511. //
  1512. // TinyBoy2 128x64 OLED / Encoder Panel
  1513. //
  1514. //#define OLED_PANEL_TINYBOY2
  1515.  
  1516. //
  1517. // Makeboard 3D Printer Parts 3D Printer Mini Display 1602 Mini Controller
  1518. // https://www.aliexpress.com/item/Micromake-Makeboard-3D-Printer-Parts-3D-Printer-Mini-Display-1602-Mini-Controller-Compatible-with-Ramps-1/32765887917.html
  1519. //
  1520. //#define MAKEBOARD_MINI_2_LINE_DISPLAY_1602
  1521.  
  1522. //
  1523. // MKS MINI12864 with graphic controller and SD support
  1524. // http://reprap.org/wiki/MKS_MINI_12864
  1525. //
  1526. //#define MKS_MINI_12864
  1527.  
  1528. //
  1529. // Factory display for Creality CR-10
  1530. // https://www.aliexpress.com/item/Universal-LCD-12864-3D-Printer-Display-Screen-With-Encoder-For-CR-10-CR-7-Model/32833148327.html
  1531. //
  1532. // This is RAMPS-compatible using a single 10-pin connector.
  1533. // (For CR-10 owners who want to replace the Melzi Creality board but retain the display)
  1534. //
  1535. //#define CR10_STOCKDISPLAY
  1536.  
  1537. //
  1538. // MKS OLED 1.3" 128x64 FULL GRAPHICS CONTROLLER
  1539. // http://reprap.org/wiki/MKS_12864OLED
  1540. //
  1541. // Tiny, but very sharp OLED display
  1542. // If there is a pixel shift, try the other controller.
  1543. //
  1544. //#define MKS_12864OLED // Uses the SH1106 controller (default)
  1545. //#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
  1546.  
  1547. // CONTROLLER TYPE: Serial display
  1548.  
  1549. // Nextion 4.3" HMI panel model NX4827T043_11
  1550. //#define NEXTION
  1551. // Define Serial it use
  1552. #define NEXTION_SERIAL 1
  1553. // Define ms for update display (for 8 the default value is best, for 32 bit 1500 is best)
  1554. #define NEXTION_UPDATE_INTERVAL 3000
  1555. // For GFX preview visualization enable NEXTION GFX
  1556. //#define NEXTION_GFX
  1557. // Define name firmware file for Nextion on SD
  1558. #define NEXTION_FIRMWARE_FILE "mk4duo.tft"
  1559.  
  1560. // Show a progress bar on HD44780 LCDs for SD printing
  1561. //#define LCD_PROGRESS_BAR
  1562. // Amount of time (ms) to show the bar
  1563. #define PROGRESS_BAR_BAR_TIME 5000
  1564. // Amount of time (ms) to show the status message
  1565. #define PROGRESS_BAR_MSG_TIME 1500
  1566. // Amount of time (ms) to retain the status message (0=forever)
  1567. #define PROGRESS_MSG_EXPIRE 0
  1568. // Uncomment this to show messages for MSG_TIME then hide them
  1569. //#define PROGRESS_MSG_ONCE
  1570. // Add a menu item to test the progress bar:
  1571. //#define LCD_PROGRESS_BAR_TEST
  1572. /************************************************************************************************/
  1573.  
  1574.  
  1575. /**************************************************************************
  1576. *************************** Canon RC-1 Remote ****************************
  1577. **************************************************************************
  1578. * *
  1579. * M240 Triggers a camera by emulating a Canon RC-1 Remote *
  1580. * Data from: http://www.doc-diy.net/photo/rc-1_hacked/ *
  1581. * *
  1582. * You also need to set PHOTOGRAPH_PIN in Configuration_pins.h *
  1583. * *
  1584. **************************************************************************/
  1585. //#define PHOTOGRAPH
  1586. /**************************************************************************/
  1587.  
  1588.  
  1589. /**************************************************************************
  1590. ***************************** Camera trigger *****************************
  1591. **************************************************************************
  1592. * *
  1593. * M240 Triggering CHDK to take a picture see how to use it here: *
  1594. * http://captain-slow.dk/2014/03/09/3d-printing-timelapses/ *
  1595. * *
  1596. * You also need to set CHDK_PIN in Configuration_pins.h *
  1597. * *
  1598. **************************************************************************/
  1599. //#define CHDK
  1600.  
  1601. #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
  1602. /**************************************************************************/
  1603.  
  1604.  
  1605. /**************************************************************************
  1606. *********************** RIFD module card reader **************************
  1607. **************************************************************************
  1608. * *
  1609. * Support RFID module card reader width UART interface. *
  1610. * This module mount chip MFRC522 designed to communicate with *
  1611. * ISO/IEC 14443 A/MIFARE cards and transponders without additional *
  1612. * active circuitry *
  1613. * *
  1614. * New command for this system is: *
  1615. * M522 T<extruder> R<read> or W<write> *
  1616. * *
  1617. * Define if you used and Serial used. *
  1618. * *
  1619. **************************************************************************/
  1620. //#define RFID_MODULE
  1621.  
  1622. #define RFID_SERIAL 1
  1623. /**************************************************************************/
  1624.  
  1625.  
  1626. /**************************************************************************
  1627. ********************************* BLINKM *********************************
  1628. **************************************************************************
  1629. * *
  1630. * Support for BlinkM/CyzRgb *
  1631. * *
  1632. **************************************************************************/
  1633. //#define BLINKM
  1634. /**************************************************************************/
  1635.  
  1636.  
  1637. /**************************************************************************
  1638. ******************************** RGB LED *********************************
  1639. **************************************************************************
  1640. * *
  1641. * Enable support for an RGB LED connected to 5V digital pins, or *
  1642. * an RGB Strip connected to MOSFETs controlled by digital pins. *
  1643. * *
  1644. * Adds the M150 command to set the LED (or LED strip) color. *
  1645. * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of *
  1646. * luminance values can be set from 0 to 255. *
  1647. * *
  1648. * *** CAUTION *** *
  1649. * LED Strips require a MOFSET Chip between PWM lines and LEDs, *
  1650. * as the Arduino cannot handle the current the LEDs will require. *
  1651. * Failure to follow this precaution can destroy your Arduino! *
  1652. * *** CAUTION *** *
  1653. * *
  1654. * LED type. These options are mutually-exclusive. Uncomment only one. *
  1655. * *
  1656. **************************************************************************/
  1657. //#define RGB_LED
  1658. //#define RGBW_LED
  1659. /**************************************************************************/
  1660.  
  1661.  
  1662. /**************************************************************************
  1663. *************************** PCA 9632 PWM LED *****************************
  1664. **************************************************************************
  1665. * *
  1666. * Support PCA 9632 PWM LED driver *
  1667. * *
  1668. **************************************************************************/
  1669. //#define PCA9632
  1670. /**************************************************************************/
  1671.  
  1672.  
  1673. /**************************************************************************
  1674. ********************* Adafruit Neopixel LED driver ***********************
  1675. **************************************************************************
  1676. * *
  1677. * Support for Adafruit Neopixel LED driver *
  1678. * *
  1679. **************************************************************************/
  1680. //#define NEOPIXEL_LED
  1681.  
  1682. // NEO_GRBW / NEO_GRB - four/three channel driver type
  1683. // (defined in Adafruit_NeoPixel.h)
  1684. #define NEOPIXEL_TYPE NEO_GRB
  1685. // Number of LEDs on strip
  1686. #define NEOPIXEL_PIXELS 16
  1687. // Sequential display for temperature change - LED by LED.
  1688. // Comment out for all LEDs to change at once.
  1689. #define NEOPIXEL_IS_SEQUENTIAL
  1690. // Initial brightness 0-255
  1691. #define NEOPIXEL_BRIGHTNESS 255
  1692. // Cycle through colors at startup
  1693. //#define NEOPIXEL_STARTUP_TEST
  1694. /**************************************************************************/
  1695.  
  1696.  
  1697. /********************************************************************************
  1698. ***************************** Printer Event LEDs *******************************
  1699. ********************************************************************************
  1700. * *
  1701. * During printing, the LEDs will reflect the printer status: *
  1702. * *
  1703. * - Gradually change from blue to violet as the heated bed gets to target temp* *
  1704. * - Gradually change from violet to red as the hotend gets to temperature *
  1705. * - Change to white to illuminate work surface *
  1706. * - Change to green once print has finished *
  1707. * - Turn off after the print has finished and the user has pushed a button *
  1708. * *
  1709. ********************************************************************************/
  1710. //#define PRINTER_EVENT_LEDS
  1711. /********************************************************************************/
  1712.  
  1713.  
  1714. /**************************************************************************
  1715. ********************************* Laser **********************************
  1716. **************************************************************************
  1717. * *
  1718. * Support for laser beam *
  1719. * Check also Configuration_Laser.h *
  1720. * *
  1721. **************************************************************************/
  1722. //#define LASER
  1723. /**************************************************************************/
  1724.  
  1725.  
  1726. /**************************************************************************
  1727. ******************************* CNC Router *******************************
  1728. **************************************************************************
  1729. * *
  1730. * Support for CNC Router *
  1731. * Check also Configuration_CNCRouter.h *
  1732. * *
  1733. **************************************************************************/
  1734. //#define CNCROUTER
  1735. /**************************************************************************/
  1736.  
  1737.  
  1738. /**************************************************************************
  1739. ******************************* Case Light *******************************
  1740. **************************************************************************
  1741. * *
  1742. * M355 Case Light on-off / brightness *
  1743. * *
  1744. **************************************************************************/
  1745. //#define CASE_LIGHT
  1746.  
  1747. // set to true if case light is ON when pin is at 0
  1748. #define INVERT_CASE_LIGHT false
  1749. // set default power up state to on or off
  1750. #define CASE_LIGHT_DEFAULT_ON false
  1751. // set power up brightness 0-255 ( only used if on PWM
  1752. // and if CASE_LIGHT_DEFAULT is set to on)
  1753. #define CASE_LIGHT_DEFAULT_BRIGHTNESS 255
  1754. // Use Neopixel LED as case light, requires NEOPIXEL LED.
  1755. //#define CASE_LIGHT_USE_NEOPIXEL
  1756. // { Red, Green, Blue, White }
  1757. #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 }
  1758. /**************************************************************************/
  1759.  
  1760.  
  1761. //===========================================================================
  1762. //========================= ADVANCED MOTION FEATURES ========================
  1763. //===========================================================================
  1764.  
  1765. /***********************************************************************
  1766. ********************* Stepper auto deactivation ***********************
  1767. ***********************************************************************
  1768. * *
  1769. * Default stepper release if idle. Set to 0 to deactivate. *
  1770. * Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after *
  1771. * the last move when DISABLE_INACTIVE_? is defined. *
  1772. * Time can be set by M18 and M84. *
  1773. * *
  1774. ***********************************************************************/
  1775. #define DEFAULT_STEPPER_DEACTIVE_TIME 120
  1776. #define DISABLE_INACTIVE_X
  1777. #define DISABLE_INACTIVE_Y
  1778. #define DISABLE_INACTIVE_Z
  1779. #define DISABLE_INACTIVE_E
  1780. /***********************************************************************/
  1781.  
  1782.  
  1783. /***********************************************************************
  1784. ********************** Double / Quad Stepping *************************
  1785. ***********************************************************************
  1786. * *
  1787. * Disable double / quad stepping *
  1788. * *
  1789. ***********************************************************************/
  1790. //#define DISABLE_DOUBLE_QUAD_STEPPING
  1791. /***********************************************************************/
  1792.  
  1793.  
  1794. /***********************************************************************
  1795. ************************* Low speed stepper ***************************
  1796. ***********************************************************************
  1797. * *
  1798. * Set this if you find stepping unreliable, *
  1799. * or if using a very fast CPU. *
  1800. * *
  1801. ***********************************************************************/
  1802. // (µs) The smallest stepper pulse allowed
  1803. #define MINIMUM_STEPPER_PULSE 0
  1804. /***********************************************************************/
  1805.  
  1806.  
  1807. /***********************************************************************
  1808. *************************** Microstepping *****************************
  1809. ***********************************************************************
  1810. * *
  1811. * Microstep setting (Only functional when stepper driver *
  1812. * microstep pins are connected to MCU. *
  1813. * *
  1814. * Alligator Board support 16 or 32 only value *
  1815. * *
  1816. ***********************************************************************/
  1817. //#define USE_MICROSTEPS
  1818.  
  1819. // X Y Z E - [1,2,4,8,16,32]
  1820. #define MICROSTEP_MODES {16, 16, 16, 16}
  1821. /***********************************************************************/
  1822.  
  1823.  
  1824. /***********************************************************************
  1825. ************************** Motor's current ****************************
  1826. ***********************************************************************/
  1827. // Motor Current setting (Only functional on ALLIGATOR BOARD)
  1828. // X Y Z E0 E1 E2 E3 - Values 0 - 2.5 A
  1829. #define MOTOR_CURRENT {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
  1830.  
  1831. // Motor Current setting (Only functional when motor driver current
  1832. // ref pins are connected to a digital trimpot on supported boards)
  1833. // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
  1834. #define DIGIPOT_MOTOR_CURRENT {135, 135, 135, 135, 135}
  1835.  
  1836. // Motor Current for XY, Z, E in mA
  1837. #define PWM_MOTOR_CURRENT {1200, 1000, 1000}
  1838. /***********************************************************************/
  1839.  
  1840.  
  1841. /***********************************************************************
  1842. **************************** I2C DIGIPOT ******************************
  1843. ***********************************************************************
  1844. * *
  1845. * I2C based DIGIPOT like on the Azteeg X3 Pro *
  1846. * *
  1847. ***********************************************************************/
  1848. //#define DIGIPOT_I2C
  1849. // Number of channels available for I2C digipot, For Azteeg X3 Pro we have 8
  1850. #define DIGIPOT_I2C_NUM_CHANNELS 8
  1851. // actual motor currents in Amps, need as many here as DIGIPOT_I2C_NUM_CHANNELS
  1852. #define DIGIPOT_I2C_MOTOR_CURRENTS {1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0}
  1853. /***********************************************************************/
  1854.  
  1855.  
  1856. /***********************************************************************
  1857. *************************** Toshiba steppers **************************
  1858. ***********************************************************************
  1859. * *
  1860. * Support for Toshiba steppers *
  1861. * *
  1862. ***********************************************************************/
  1863. //#define CONFIG_STEPPERS_TOSHIBA
  1864. /***********************************************************************/
  1865.  
  1866.  
  1867. /**********************************************************************************
  1868. **************************** TMC26X motor drivers ********************************
  1869. **********************************************************************************
  1870. * *
  1871. * Support for TMC26X motor drivers *
  1872. * See Configuration_Motor_Driver.h for configuration stepper driver *
  1873. * *
  1874. **********************************************************************************/
  1875. //#define HAVE_TMCDRIVER
  1876. /**********************************************************************************/
  1877.  
  1878.  
  1879. /**********************************************************************************
  1880. *********************** Trinamic TMC2130 motor drivers ***************************
  1881. **********************************************************************************
  1882. * *
  1883. * Enable this for SilentStepStick Trinamic TMC2130 SPI-configurable stepper *
  1884. * drivers. *
  1885. * *
  1886. * You'll also need the TMC2130Stepper Arduino library *
  1887. * (https://github.com/teemuatlut/TMC2130Stepper). *
  1888. * *
  1889. * To use TMC2130 stepper drivers in SPI mode connect your SPI2130 pins to *
  1890. * the hardware SPI interface on your board and define the required CS pins *
  1891. * in your `MYBOARD.h` file. (e.g., RAMPS 1.4 uses AUX3 pins `X_CS_PIN 53`, *
  1892. * Y_CS_PIN 49`, etc.). *
  1893. * *
  1894. * See Configuration_Motor_Driver.h for configuration stepper driver *
  1895. * *
  1896. **********************************************************************************/
  1897. //#define HAVE_TMC2130
  1898. /**********************************************************************************/
  1899.  
  1900.  
  1901. /**********************************************************************************
  1902. *********************** Trinamic TMC2208 motor drivers ***************************
  1903. **********************************************************************************
  1904. * *
  1905. * Enable this for SilentStepStick Trinamic TMC2208 UART-configurable stepper *
  1906. * drivers. *
  1907. * Connect #_SERIAL_TX_PIN to the driver side PDN_UART pin. *
  1908. * To use the reading capabilities, also connect #_SERIAL_RX_PIN *
  1909. * to #_SERIAL_TX_PIN with a 1K resistor. *
  1910. * The drivers can also be used with hardware serial. *
  1911. * *
  1912. * You'll also need the TMC2208Stepper Arduino library *
  1913. * (https://github.com/teemuatlut/TMC2208Stepper). *
  1914. * *
  1915. * See Configuration_Motor_Driver.h for configuration stepper driver *
  1916. * *
  1917. **********************************************************************************/
  1918. //#define HAVE_TMC2208
  1919. /**********************************************************************************/
  1920.  
  1921.  
  1922. /**********************************************************************************
  1923. ****************************** L6470 motor drivers *******************************
  1924. **********************************************************************************
  1925. * *
  1926. * Support for L6470 motor drivers *
  1927. * You need to import the L6470 library into the arduino IDE for this. *
  1928. * *
  1929. * See Configuration_Motor_Driver.h for configuration stepper driver *
  1930. * *
  1931. **********************************************************************************/
  1932. //#define HAVE_L6470DRIVER
  1933. /**********************************************************************************/
  1934.  
  1935.  
  1936. //===========================================================================
  1937. //============================= ADVANCED FEATURES ===========================
  1938. //===========================================================================
  1939.  
  1940.  
  1941. /****************************************************************************************
  1942. ************************************** Buffer stuff ************************************
  1943. ****************************************************************************************/
  1944. // The number of linear motions that can be in the plan at any give time.
  1945. // THE BLOCK BUFFER SIZE NEEDS TO BE A POWER OF 2 (i.g. 8, 16, 32) because shifts
  1946. // and ors are used to do the ring-buffering.
  1947. // For Arduino DUE setting BLOCK BUFFER SIZE to 32
  1948. #define BLOCK_BUFFER_SIZE 16
  1949.  
  1950. // The ASCII buffer for receiving from the serial:
  1951. #define MAX_CMD_SIZE 96
  1952. // For Arduino DUE setting to 8
  1953. #define BUFSIZE 4
  1954.  
  1955. /** START Function only for 8 bit proccesor */
  1956. // Transmission to Host Buffer Size
  1957. // To save 386 bytes of PROGMEM (and TX_BUFFER_SIZE+3 bytes of RAM) set to 0.
  1958. // To buffer a simple "ok" you need 4 bytes.
  1959. // For ADVANCED_OK (M105) you need 32 bytes.
  1960. // For debug-echo: 128 bytes for the optimal speed.
  1961. // Other output doesn't need to be that speedy.
  1962. // 0, 2, 4, 8, 16, 32, 64, 128, 256
  1963. #define TX_BUFFER_SIZE 32
  1964.  
  1965. // Host Receive Buffer Size
  1966. // Without XON/XOFF flow control (see SERIAL XON XOFF below) 32 bytes should be enough.
  1967. // To use flow control, set this buffer size to at least 1024 bytes.
  1968. // 0, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048
  1969. #define RX_BUFFER_SIZE 128
  1970.  
  1971. // Enable to have the controller send XON/XOFF control characters to
  1972. // the host to signal the RX buffer is becoming full.
  1973. //#define SERIAL_XON_XOFF
  1974.  
  1975. // Enable this option to collect and display the maximum
  1976. // RX queue usage after transferring a file to SD.
  1977. //#define SERIAL_STATS_MAX_RX_QUEUED
  1978.  
  1979. // Enable this option to collect and display the number
  1980. // of dropped bytes after a file transfer to SD.
  1981. //#define SERIAL_STATS_DROPPED_RX
  1982. /** END Function only for 8 bit proccesor */
  1983.  
  1984. // Defines the number of memory slots for saving/restoring position (G60/G61)
  1985. // The values should not be less than 1
  1986. #define NUM_POSITON_SLOTS 2
  1987.  
  1988. // minimum time in microseconds that a movement needs to take if the buffer is emptied.
  1989. #define DEFAULT_MINSEGMENTTIME 20000
  1990.  
  1991. //
  1992. // G2/G3 Arc Support
  1993. //
  1994. // Disable this feature to save ~3226 bytes
  1995. #define ARC_SUPPORT
  1996. #define MM_PER_ARC_SEGMENT 1 // Length of each arc segment
  1997. #define N_ARC_CORRECTION 25 // Number of intertpolated segments between corrections
  1998. //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles
  1999. //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes
  2000.  
  2001. // Moves with fewer segments than this will be ignored and joined with the next movement
  2002. #define MIN_STEPS_PER_SEGMENT 6
  2003.  
  2004. // Uncomment to add the M100 Free Memory Watcher for debug purpose
  2005. //#define M100_FREE_MEMORY_WATCHER
  2006.  
  2007. // Comment out to remove Dump sub-command
  2008. #define M100_FREE_MEMORY_DUMPER
  2009. // Comment out to remove Corrupt sub-command
  2010. #define M100_FREE_MEMORY_CORRUPTOR
  2011. /****************************************************************************************/
  2012.  
  2013.  
  2014. /****************************************************************************************
  2015. ********************************* Nozzle Clean Feature *********************************
  2016. ****************************************************************************************
  2017. * *
  2018. * When enabled allows the user to send G12 to start the nozzle cleaning *
  2019. * process, the G-Code accepts two parameters: *
  2020. * "P" for pattern selection *
  2021. * "S" for defining the number of strokes/repetitions *
  2022. * "T" for defining the number of triangles *
  2023. * "R" for defining the center of circle *
  2024. * *
  2025. * Available list of patterns: *
  2026. * P0: This is the default pattern, this process requires a sponge type *
  2027. * material at a fixed bed location. S defines "strokes" i.e. *
  2028. * back-and-forth movements between the starting and end points. *
  2029. * *
  2030. * P1: This starts a zig-zag pattern between (X0, Y0) and (X1, Y1), "T" *
  2031. * defines the number of zig-zag triangles to be done. "S" defines the *
  2032. * number of strokes aka one back-and-forth movement. As an example *
  2033. * sending "G12 P1 S1 T3" will execute: *
  2034. * *
  2035. * -- *
  2036. * | (X0, Y1) | /\ /\ /\ | (X1, Y1) *
  2037. * | | / \ / \ / \ | *
  2038. * A | | / \ / \ / \ | *
  2039. * | | / \ / \ / \ | *
  2040. * | (X0, Y0) | / \/ \/ \ | (X1, Y0) *
  2041. * -- +--------------------------------+ *
  2042. * |________|_________|_________| *
  2043. * T1 T2 T3 *
  2044. * *
  2045. * P2: This starts a circular pattern with circle with middle in *
  2046. * NOZZLE CLEAN CIRCLE MIDDLE radius of R and stroke count of S. *
  2047. * Before starting the circle nozzle goes to NOZZLE CLEAN START POINT. *
  2048. * *
  2049. * Caveats: End point Z should use the same value as Start point Z. *
  2050. * *
  2051. * Attention: This is an EXPERIMENTAL feature, in the future the G-code arguments *
  2052. * may change to add new functionality like different wipe patterns. *
  2053. * *
  2054. ****************************************************************************************/
  2055. //#define NOZZLE_CLEAN_FEATURE
  2056.  
  2057. // Default number of pattern repetitions
  2058. #define NOZZLE_CLEAN_STROKES 12
  2059.  
  2060. // Default number of triangles
  2061. #define NOZZLE_CLEAN_TRIANGLES 3
  2062.  
  2063. // Specify positions as { X, Y, Z }
  2064. #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
  2065. #define NOZZLE_CLEAN_END_POINT {100, 60, (Z_MIN_POS + 1)}
  2066.  
  2067. // Circular pattern radius
  2068. #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
  2069. // Circular pattern circle fragments number
  2070. #define NOZZLE_CLEAN_CIRCLE_FN 10
  2071. // Middle point of circle
  2072. #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
  2073.  
  2074. // Moves the nozzle to the initial position
  2075. #define NOZZLE_CLEAN_GOBACK
  2076. /****************************************************************************************/
  2077.  
  2078.  
  2079. /****************************************************************************************
  2080. ********************************** Nozzle Park Feature *********************************
  2081. ****************************************************************************************
  2082. * *
  2083. * When enabled allows the user to define a special XYZ position, inside the *
  2084. * machine's topology, to park the nozzle when idle or when receiving the G27 *
  2085. * command. *
  2086. * *
  2087. * The "P" paramenter controls what is the action applied to the Z axis: *
  2088. * P0: (Default) If current Z-pos is lower than Z-park then the nozzle will *
  2089. * be raised to reach Z-park height. *
  2090. * *
  2091. * P1: No matter the current Z-pos, the nozzle will be raised/lowered to *
  2092. * reach Z-park height. *
  2093. * *
  2094. * P2: The nozzle height will be raised by Z-park amount but never going over *
  2095. * the machine's limit of Z_MAX_POS. *
  2096. * *
  2097. ****************************************************************************************/
  2098. //#define NOZZLE_PARK_FEATURE
  2099.  
  2100. // Specify a park position as { X, Y, Z }
  2101. #define NOZZLE_PARK_POINT { 10, 10, 20 }
  2102. #define NOZZLE_PARK_XY_FEEDRATE 100 // X and Y axes feedrate in mm/s (also used for delta printers Z axis)
  2103. #define NOZZLE_PARK_Z_FEEDRATE 5 // Z axis feedrate in mm/s (not used for delta printers)
  2104. /****************************************************************************************/
  2105.  
  2106.  
  2107. /**************************************************************************
  2108. ************************ Advanced Pause Park *****************************
  2109. **************************************************************************
  2110. * *
  2111. * Advanced Pause Park feature for filament change support and for parking*
  2112. * the nozzle when paused. *
  2113. * Add the GCode M600 for initiating filament change. *
  2114. * *
  2115. * If PARK HEAD ON PAUSE enabled, adds the GCode M125 to pause printing *
  2116. * and park the nozzle. *
  2117. * *
  2118. * Requires an LCD display. *
  2119. * Requires NOZZLE PARK FEATURE *
  2120. * This feature is required for the default FILAMENT RUNOUT SCRIPT. *
  2121. * *
  2122. **************************************************************************/
  2123. //#define ADVANCED_PAUSE_FEATURE
  2124.  
  2125. #define PAUSE_PARK_RETRACT_FEEDRATE 20 // Initial retract feedrate in mm/s
  2126. #define PAUSE_PARK_RETRACT_LENGTH 5 // Initial retract in mm
  2127. // It is a short retract used immediately after print interrupt before move to filament exchange position
  2128. #define PAUSE_PARK_COOLDOWN_TEMP 0 // Cooling temperature, if this parameter is equal to 0 no cooling.
  2129. #define PAUSE_PARK_RETRACT_2_FEEDRATE 20 // Second retract filament feedrate in mm/s - filament retract post cool down
  2130. #define PAUSE_PARK_RETRACT_2_LENGTH 20 // Second retract filament length from hotend in mm
  2131. #define PAUSE_PARK_UNLOAD_FEEDRATE 100 // Unload filament feedrate in mm/s - filament unloading can be fast
  2132. #define PAUSE_PARK_UNLOAD_LENGTH 100 // Unload filament length from hotend in mm
  2133. // Longer length for bowden printers to unload filament from whole bowden tube,
  2134. // shorter length for printers without bowden to unload filament from extruder only,
  2135. // 0 to disable unloading for manual unloading
  2136. #define PAUSE_PARK_LOAD_FEEDRATE 100 // Load filament feedrate in mm/s - filament loading into the bowden tube can be fast
  2137. #define PAUSE_PARK_LOAD_LENGTH 100 // Load filament length over hotend in mm
  2138. // Longer length for bowden printers to fast load filament into whole bowden tube over the hotend,
  2139. // Short or zero length for printers without bowden where loading is not used
  2140. #define PAUSE_PARK_EXTRUDE_FEEDRATE 5 // Extrude filament feedrate in mm/s - must be slower than load feedrate
  2141. #define PAUSE_PARK_EXTRUDE_LENGTH 50 // Extrude filament length in mm after filament is load over the hotend,
  2142. // 0 to disable for manual extrusion
  2143. // Filament can be extruded repeatedly from the filament exchange menu to fill the hotend,
  2144. // or until outcoming filament color is not clear for filament color change
  2145. #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // Turn off nozzle if user doesn't change filament within this time limit in seconds
  2146. #define PAUSE_PARK_PRINTER_OFF 5 // Turn off printer if user doesn't change filament within this time limit in Minutes
  2147. #define PAUSE_PARK_NUMBER_OF_ALERT_BEEPS 5 // Number of alert beeps before printer goes quiet
  2148. #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable to have stepper motors hold position during filament change
  2149. // even if it takes longer than DEFAULT STEPPER DEACTIVE TIME.
  2150. //#define PARK_HEAD_ON_PAUSE // Go to filament change position on pause, return to print position on resume
  2151. /**************************************************************************/
  2152.  
  2153.  
  2154. /*****************************************************************************************
  2155. ****************************** G20/G21 Inch mode support ********************************
  2156. *****************************************************************************************/
  2157. //#define INCH_MODE_SUPPORT
  2158. /****************************************************************************************/
  2159.  
  2160.  
  2161. /*****************************************************************************************
  2162. ************************************* JSON OUTPUT ***************************************
  2163. *****************************************************************************************
  2164. * *
  2165. * M408: Report JSON-style response *
  2166. * Report a JSON-style response by specifying the desired type using the 'S' parameter. *
  2167. * The following response types are supported: *
  2168. * Type 0 is a short-form response. *
  2169. * Type 1 is like type 0 except that static values are also included. *
  2170. * Type 2 is similar to the response provided by the web server for Duet Web Control. *
  2171. * Type 3 is an extended version of type 2 which includes some additional parameters *
  2172. * that aren't expected to change very frequently. *
  2173. * Type 4 is an extended version of type 2 which may be used to poll for current *
  2174. * printer statistics. *
  2175. * Type 5 reports the current machine configuration. *
  2176. * *
  2177. *****************************************************************************************/
  2178. //#define JSON_OUTPUT
  2179. /*****************************************************************************************/
  2180.  
  2181.  
  2182. /*****************************************************************************************
  2183. *********************************** M43 pins info ***************************************
  2184. *****************************************************************************************
  2185. * *
  2186. * M43 Pins info and testing *
  2187. * *
  2188. *****************************************************************************************/
  2189. //#define PINS_DEBUGGING
  2190. /*****************************************************************************************/
  2191.  
  2192.  
  2193. /*****************************************************************************************
  2194. ****************************** Extend capabilities report *******************************
  2195. *****************************************************************************************
  2196. * *
  2197. * Include capabilities in M115 output *
  2198. * *
  2199. *****************************************************************************************/
  2200. //#define EXTENDED_CAPABILITIES_REPORT
  2201. /*****************************************************************************************/
  2202.  
  2203.  
  2204. /*****************************************************************************************
  2205. *************************************** Whatchdog ***************************************
  2206. *****************************************************************************************
  2207. * *
  2208. * The hardware watchdog should reset the microcontroller disabling all outputs, *
  2209. * in case the firmware gets stuck and doesn't do temperature regulation. *
  2210. * *
  2211. * Uncomment USE_WATCHDOG to enable this feature *
  2212. * *
  2213. *****************************************************************************************/
  2214. //#define USE_WATCHDOG
  2215.  
  2216. // If you have a watchdog reboot in an ArduinoMega2560 then the device will hang forever, as a watchdog reset will leave the watchdog on.
  2217. // The "WATCHDOG_RESET_MANUAL" goes around this by not using the hardware reset.
  2218. // However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
  2219. //#define WATCHDOG_RESET_MANUAL
  2220. /*****************************************************************************************/
  2221.  
  2222.  
  2223. /*****************************************************************************************
  2224. ********************************* Start / Stop Gcode ************************************
  2225. *****************************************************************************************
  2226. * *
  2227. * Start - Stop Gcode use when Start or Stop printing width M530 command *
  2228. * *
  2229. *****************************************************************************************/
  2230. //#define START_GCODE
  2231. #define START_PRINTING_SCRIPT "G28\nG1 Z10 F8000"
  2232.  
  2233. //#define STOP_GCODE
  2234. #define STOP_PRINTING_SCRIPT "G28\nM107\nM104 T0 S0\nM140 S0\nM84\nM81"
  2235. /*****************************************************************************************/
  2236.  
  2237.  
  2238. /*****************************************************************************************
  2239. ******************************* Proportional Font ratio *********************************
  2240. *****************************************************************************************
  2241. * Set the number of proportional font spaces required to fill up a typical *
  2242. * character space. *
  2243. * This can help to better align the output of commands like `G29 O` Mesh Output. *
  2244. * *
  2245. * For clients that use a fixed-width font (like OctoPrint), leave this set to 1.0. *
  2246. * Otherwise, adjust according to your client and font. *
  2247. * *
  2248. *****************************************************************************************/
  2249. #define PROPORTIONAL_FONT_RATIO 1
  2250. /*****************************************************************************************/
  2251.  
  2252.  
  2253. /*****************************************************************************************
  2254. *********************************** User menu items *************************************
  2255. *****************************************************************************************
  2256. * *
  2257. * USer-defined menu items that execute custom GCode *
  2258. * *
  2259. *****************************************************************************************/
  2260. //#define CUSTOM_USER_MENUS
  2261.  
  2262. #define USER_SCRIPT_DONE "M117 User Script Done"
  2263.  
  2264. #define USER_DESC_1 "Home & ABL"
  2265. #define USER_GCODE_1 "G28\nG29"
  2266.  
  2267. #define USER_DESC_2 "Preheat for PLA"
  2268. #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
  2269.  
  2270. #define USER_DESC_3 "Preheat for ABS"
  2271. #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
  2272.  
  2273. #define USER_DESC_4 "Heat Bed/Home/Level"
  2274. #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
  2275.  
  2276. #define USER_DESC_5 "Home & Info"
  2277. #define USER_GCODE_5 "G28\nM503"
  2278. /*****************************************************************************************/
  2279.  
  2280. #endif /* _CONFIGURATION_FEATURE_H_ */
Add Comment
Please, Sign In to add comment