Skip to content
Snippets Groups Projects
Configuration.h 57.9 KiB
Newer Older
  • Learn to ignore specific revisions
  • //
    //#define TEMPERATURE_UNITS_SUPPORT
    
    
    // Preheat Constants
    
    #define PREHEAT_1_TEMP_HOTEND 180
    #define PREHEAT_1_TEMP_BED     70
    #define PREHEAT_1_FAN_SPEED     0 // Value from 0 to 255
    
    #define PREHEAT_2_TEMP_HOTEND 240
    #define PREHEAT_2_TEMP_BED    110
    #define PREHEAT_2_FAN_SPEED     0 // Value from 0 to 255
    
    /**
     * Nozzle Park -- EXPERIMENTAL
     *
     * Park the nozzle at the given XYZ position on idle or G27.
     *
     * The "P" parameter controls the action applied to the Z axis:
     *
     *    P0  (Default) If Z is below park Z raise the nozzle.
     *    P1  Raise the nozzle always to Z-park height.
     *    P2  Raise the nozzle by Z-park amount, limited to Z_MAX_POS.
     */
    
    //#define NOZZLE_PARK_FEATURE
    
    #if ENABLED(NOZZLE_PARK_FEATURE)
      // Specify a park position as { X, Y, Z }
      #define NOZZLE_PARK_POINT { (X_MIN_POS + 10), (Y_MAX_POS - 10), 20 }
    #endif
    
    
    /**
     * Clean Nozzle Feature -- EXPERIMENTAL
     *
     * Adds the G12 command to perform a nozzle cleaning process.
     *
     * Parameters:
     *   P  Pattern
     *   S  Strokes / Repetitions
     *   T  Triangles (P1 only)
     *
     * Patterns:
     *   P0  Straight line (default). This process requires a sponge type material
     *       at a fixed bed location. "S" specifies strokes (i.e. back-forth motions)
     *       between the start / end points.
     *
     *   P1  Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the
     *       number of zig-zag triangles to do. "S" defines the number of strokes.
     *       Zig-zags are done in whichever is the narrower dimension.
     *       For example, "G12 P1 S1 T3" will execute:
     *
     *          --
     *         |  (X0, Y1) |     /\        /\        /\     | (X1, Y1)
     *         |           |    /  \      /  \      /  \    |
     *       A |           |   /    \    /    \    /    \   |
     *         |           |  /      \  /      \  /      \  |
     *         |  (X0, Y0) | /        \/        \/        \ | (X1, Y0)
     *          --         +--------------------------------+
     *                       |________|_________|_________|
     *                           T1        T2        T3
     *
     *   P2  Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE.
     *       "R" specifies the radius. "S" specifies the stroke count.
     *       Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.
     *
     *   Caveats: The ending Z should be the same as starting Z.
     * Attention: EXPERIMENTAL. G-code arguments may change.
     *
     */
    
    //#define NOZZLE_CLEAN_FEATURE
    
    #if ENABLED(NOZZLE_CLEAN_FEATURE)
    
      // Default number of pattern repetitions
    
      #define NOZZLE_CLEAN_STROKES  12
    
      // Default number of triangles
      #define NOZZLE_CLEAN_TRIANGLES  3
    
      // Specify positions as { X, Y, Z }
      #define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
      #define NOZZLE_CLEAN_END_POINT   {100, 60, (Z_MIN_POS + 1)}
    
      // Circular pattern radius
      #define NOZZLE_CLEAN_CIRCLE_RADIUS 6.5
      // Circular pattern circle fragments number
      #define NOZZLE_CLEAN_CIRCLE_FN 10
      // Middle point of circle
      #define NOZZLE_CLEAN_CIRCLE_MIDDLE NOZZLE_CLEAN_START_POINT
    
    
      // Moves the nozzle to the initial position
      #define NOZZLE_CLEAN_GOBACK
    
    /**
     * Print Job Timer
     *
     * Automatically start and stop the print job timer on M104/M109/M190.
     *
     *   M104 (hotend, no wait) - high temp = none,        low temp = stop timer
     *   M109 (hotend, wait)    - high temp = start timer, low temp = stop timer
     *   M190 (bed, wait)       - high temp = start timer, low temp = none
     *
     * The timer can also be controlled with the following commands:
     *
     *   M75 - Start the print job timer
     *   M76 - Pause the print job timer
     *   M77 - Stop the print job timer
     */
    
    #define PRINTJOB_TIMER_AUTOSTART
    
    /**
     * Print Counter
     *
     * Track statistical data such as:
     *
     *  - Total print jobs
     *  - Total successful print jobs
     *  - Total failed print jobs
     *  - Total time printing
     *
     * View the current statistics with M78.
     */
    
    //=============================================================================
    //============================= LCD and SD support ============================
    //=============================================================================
    
    /**
     * LCD LANGUAGE
     *
     * Select the language to display on the LCD. These languages are available:
     *
     *    en, an, bg, ca, cn, cz, de, el, el-gr, es, eu, fi, fr, gl, hr, it,
     *    kana, kana_utf8, nl, pl, pt, pt_utf8, pt-br, pt-br_utf8, ru, tr, uk, test
     *
     * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cn':'Chinese', 'cz':'Czech', 'de':'German', 'el':'Greek', 'el-gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'kana':'Japanese', 'kana_utf8':'Japanese (UTF8)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt-br':'Portuguese (Brazilian)', 'pt-br_utf8':'Portuguese (Brazilian UTF8)', 'pt_utf8':'Portuguese (UTF8)', 'ru':'Russian', 'tr':'Turkish', 'uk':'Ukrainian', 'test':'TEST' }
     */
    
    #define LCD_LANGUAGE en
    
    AnHardt's avatar
    AnHardt committed
    
    
    /**
     * LCD Character Set
     *
     * Note: This option is NOT applicable to Graphical Displays.
     *
     * All character-based LCDs provide ASCII plus one of these
     * language extensions:
     *
     *  - JAPANESE ... the most common
     *  - WESTERN  ... with more accented characters
     *  - CYRILLIC ... for the Russian language
     *
     * To determine the language extension installed on your controller:
     *
     *  - Compile and upload with LCD_LANGUAGE set to 'test'
     *  - Click the controller to view the LCD menu
     *  - The LCD will display Japanese, Western, or Cyrillic text
     *
    
    Scott Lahteine's avatar
    Scott Lahteine committed
     * See https://github.com/MarlinFirmware/Marlin/wiki/LCD-Language
    
     *
     * :['JAPANESE', 'WESTERN', 'CYRILLIC']
     */
    
    #define DISPLAY_CHARSET_HD44780 JAPANESE
    
    /**
     * LCD TYPE
     *
     * Enable ULTRA_LCD for a 16x2, 16x4, 20x2, or 20x4 character-based LCD.
     * Enable DOGLCD for a 128x64 (ST7565R) Full Graphical Display.
     * (These options will be enabled automatically for most displays.)
     *
     * IMPORTANT: The U8glib library is required for Full Graphic Display!
     *            https://github.com/olikraus/U8glib_Arduino
     */
    
    //#define ULTRA_LCD   // Character based
    //#define DOGLCD      // Full graphics display
    
    
    /**
     * SD CARD
     *
     * SD Card support is disabled by default. If your controller has an SD slot,
     * you must uncomment the following option or it won't work.
     *
     */
    
    /**
     * SD CARD: SPI SPEED
     *
     * Enable one of the following items for a slower SPI transfer speed.
     * This may be required to resolve "volume init" errors.
     */
    
    //#define SPI_SPEED SPI_HALF_SPEED
    //#define SPI_SPEED SPI_QUARTER_SPEED
    //#define SPI_SPEED SPI_EIGHTH_SPEED
    
    
    /**
     * SD CARD: ENABLE CRC
     *
     * Use CRC checks and retries on the SD communication.
     */
    
    //#define SD_CHECK_AND_RETRY
    
    João Brázio's avatar
    João Brázio committed
    // This option overrides the default number of encoder pulses needed to
    // produce one step. Should be increased for high-resolution encoders.
    
    //
    //#define ENCODER_PULSES_PER_STEP 1
    
    João Brázio's avatar
    João Brázio committed
    // Use this option to override the number of step signals required to
    // move between next/prev menu items.
    
    //
    //#define ENCODER_STEPS_PER_MENU_ITEM 5
    
    /**
     * Encoder Direction Options
     *
     * Test your encoder's behavior first with both options disabled.
     *
     *  Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION.
     *  Reversed Menu Navigation only?    Enable REVERSE_MENU_DIRECTION.
     *  Reversed Value Editing only?      Enable BOTH options.
     */
    
    
    // This option reverses the encoder direction everywhere.
    
    //
    //  Set this option if CLOCKWISE causes values to DECREASE
    //
    //#define REVERSE_ENCODER_DIRECTION
    
    
    João Brázio's avatar
    João Brázio committed
    // This option reverses the encoder direction for navigating LCD menus.
    
    //
    //  If CLOCKWISE normally moves DOWN this makes it go UP.
    //  If CLOCKWISE normally moves UP this makes it go DOWN.
    
    //
    //#define REVERSE_MENU_DIRECTION
    
    //
    // Individual Axis Homing
    //
    // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
    //
    //#define INDIVIDUAL_AXIS_HOMING_MENU
    
    
    João Brázio's avatar
    João Brázio committed
    // SPEAKER/BUZZER
    
    João Brázio's avatar
    João Brázio committed
    // If you have a speaker that can produce tones, enable it here.
    // By default Marlin assumes you have a buzzer with a fixed frequency.
    
    João Brázio's avatar
    João Brázio committed
    // The duration and frequency for the UI feedback sound.
    // Set these to 0 to disable audio feedback in the LCD menus.
    
    João Brázio's avatar
    João Brázio committed
    // Note: Test audio output with the G-Code:
    
    //  M300 S<frequency Hz> P<duration ms>
    //
    //#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
    //#define LCD_FEEDBACK_FREQUENCY_HZ 1000
    
    //
    // CONTROLLER TYPE: Standard
    //
    
    João Brázio's avatar
    João Brázio committed
    // Marlin supports a wide variety of controllers.
    // Enable one of the following options to specify your controller.
    
    João Brázio's avatar
    João Brázio committed
    // ULTIMAKER Controller.
    
    //
    //#define ULTIMAKERCONTROLLER
    
    João Brázio's avatar
    João Brázio committed
    // ULTIPANEL as seen on Thingiverse.
    
    // Cartesio UI
    // http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
    
    //#define CARTESIO_UI
    
    
    João Brázio's avatar
    João Brázio committed
    // PanelOne from T3P3 (via RAMPS 1.4 AUX2/AUX3)
    // http://reprap.org/wiki/PanelOne
    
    João Brázio's avatar
    João Brázio committed
    // MaKr3d Makr-Panel with graphic controller and SD support.
    // http://reprap.org/wiki/MaKr3d_MaKrPanel
    
    //
    // ReprapWorld Graphical LCD
    // https://reprapworld.com/?products_details&products_id/1218
    //
    //#define REPRAPWORLD_GRAPHICAL_LCD
    
    
    João Brázio's avatar
    João Brázio committed
    // Activate one of these if you have a Panucatt Devices
    // Viki 2.0 or mini Viki with Graphic LCD
    // http://panucatt.com
    
    Natealus's avatar
    Natealus committed
    //#define VIKI2
    //#define miniVIKI
    
    
    João Brázio's avatar
    João Brázio committed
    // Adafruit ST7565 Full Graphic Controller.
    
    // https://github.com/eboston/Adafruit-ST7565-Full-Graphic-Controller/
    //
    
    Ed Boston's avatar
    Ed Boston committed
    //#define ELB_FULL_GRAPHIC_CONTROLLER
    
    João Brázio's avatar
    João Brázio committed
    // RepRapDiscount Smart Controller.
    
    // http://reprap.org/wiki/RepRapDiscount_Smart_Controller
    
    João Brázio's avatar
    João Brázio committed
    // Note: Usually sold with a white PCB.
    
    //#define REPRAP_DISCOUNT_SMART_CONTROLLER
    
    João Brázio's avatar
    João Brázio committed
    // GADGETS3D G3D LCD/SD Controller
    
    Nicolas Rossi's avatar
    Nicolas Rossi committed
    // http://reprap.org/wiki/RAMPS_1.3/1.4_GADGETS3D_Shield_with_Panel
    
    João Brázio's avatar
    João Brázio committed
    // Note: Usually sold with a blue PCB.
    
    daid303's avatar
    daid303 committed
    //#define G3D_PANEL
    
    João Brázio's avatar
    João Brázio committed
    // RepRapDiscount FULL GRAPHIC Smart Controller
    
    // http://reprap.org/wiki/RepRapDiscount_Full_Graphic_Smart_Controller
    //
    
    //#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
    
    João Brázio's avatar
    João Brázio committed
    // MakerLab Mini Panel with graphic
    
    // controller and SD support - http://reprap.org/wiki/Mini_panel
    
    João Brázio's avatar
    João Brázio committed
    // RepRapWorld REPRAPWORLD_KEYPAD v1.1
    
    // http://reprapworld.com/?products_details&products_id=202&cPath=1591_1626
    
    //
    // REPRAPWORLD_KEYPAD_MOVE_STEP sets how much should the robot move when a key
    // is pressed, a value of 10.0 means 10mm per click.
    //
    
    //#define REPRAPWORLD_KEYPAD
    
    //#define REPRAPWORLD_KEYPAD_MOVE_STEP 1.0
    
    //
    // RigidBot Panel V1.0
    // http://www.inventapart.com/
    //
    //#define RIGIDBOT_PANEL
    
    //
    // BQ LCD Smart Controller shipped by
    // default with the BQ Hephestos 2 and Witbox 2.
    //
    //#define BQ_LCD_SMART_CONTROLLER
    
    
    //
    // CONTROLLER TYPE: I2C
    //
    // Note: These controllers require the installation of Arduino's LiquidCrystal_I2C
    // library. For more info: https://github.com/kiyoshigawa/LiquidCrystal_I2C
    //
    
    João Brázio's avatar
    João Brázio committed
    // Elefu RA Board Control Panel
    
    // http://www.elefu.com/index.php?route=product/product&product_id=53
    
    
    //
    // Sainsmart YW Robot (LCM1602) LCD Display
    //
    
    // Note: This controller requires F.Malpartida's LiquidCrystal_I2C library
    // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
    //
    
    //#define LCD_I2C_SAINSMART_YWROBOT
    
    // Generic LCM1602 LCD adapter
    
    João Brázio's avatar
    João Brázio committed
    // PANELOLU2 LCD with status LEDs,
    
    // separate encoder and click inputs.
    //
    // Note: This controller requires Arduino's LiquidTWI2 library v1.2.3 or later.
    // For more info: https://github.com/lincomatic/LiquidTWI2
    //
    // Note: The PANELOLU2 encoder click input can either be directly connected to
    // a pin (if BTN_ENC defined to != -1) or read through I2C (when BTN_ENC == -1).
    //
    
    //#define LCD_I2C_PANELOLU2
    
    João Brázio's avatar
    João Brázio committed
    // Panucatt VIKI LCD with status LEDs,
    
    // integrated click & L/R/U/D buttons, separate encoder inputs.
    //
    
    //#define LCD_I2C_VIKI
    
    João Brázio's avatar
    João Brázio committed
    // SSD1306 OLED full graphics generic display
    
    //#define U8GLIB_SSD1306
    
    // SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules
    
    //#define SAV_3DGLCD
    #if ENABLED(SAV_3DGLCD)
      //#define U8GLIB_SSD1306
      #define U8GLIB_SH1106
    #endif
    
    
    //
    // CONTROLLER TYPE: Shift register panels
    //
    // 2 wire Non-latching LCD SR from https://goo.gl/aJJ4sH
    
    // LCD configuration: http://reprap.org/wiki/SAV_3D_LCD
    
    //#define SAV_3DLCD
    
    //
    // TinyBoy2 128x64 OLED / Encoder Panel
    //
    //#define OLED_PANEL_TINYBOY2
    
    
    //=============================================================================
    //=============================== Extra Features ==============================
    //=============================================================================
    
    
    // Increase the FAN PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
    
    // Use software PWM to drive the fan, as for the heaters. This uses a very low frequency
    
    // which is not as annoying as with the hardware PWM. On the other hand, if this frequency
    
    // is too low, you should also increment SOFT_PWM_SCALE.
    //#define FAN_SOFT_PWM
    
    // Incrementing this by 1 will double the software PWM frequency,
    // affecting heaters, and the fan if FAN_SOFT_PWM is enabled.
    // However, control resolution will be halved for each increment;
    // at zero value, there are 128 effective control positions.
    #define SOFT_PWM_SCALE 0
    
    
    // If SOFT_PWM_SCALE is set to a value higher than 0, dithering can
    // be used to mitigate the associated resolution loss. If enabled,
    
    // some of the PWM cycles are stretched so on average the desired
    
    // duty cycle is attained.
    //#define SOFT_PWM_DITHER
    
    
    // Temperature status LEDs that display the hotend and bed temperature.
    
    // If all hotends, bed temperature, and target temperature are under 54C
    // then the BLUE led is on. Otherwise the RED led is on. (1C hysteresis)
    
    //#define TEMP_STAT_LEDS
    
    
    // M240  Triggers a camera by emulating a Canon RC-1 Remote
    // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
    
    Richard Wackerbarth's avatar
    Richard Wackerbarth committed
    //#define PHOTOGRAPH_PIN     23
    
    // SkeinForge sends the wrong arc g-codes when using Arc Point as fillet procedure
    
    //#define SF_ARC_FIX
    
    
    // Support for the BariCUDA Paste Extruder.
    //#define BARICUDA
    
    
    //define BlinkM/CyzRgb Support
    
    dot-bob's avatar
    dot-bob committed
    //define PCA9632 PWM LED driver Support
    //#define PCA9632
    
    
    /**
     * RGB LED / LED Strip Control
     *
     * Enable support for an RGB LED connected to 5V digital pins, or
     * an RGB Strip connected to MOSFETs controlled by digital pins.
     *
    
     * Adds the M150 command to set the LED (or LED strip) color.
    
     * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
     * luminance values can be set from 0 to 255.
     *
     * *** CAUTION ***
     *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
     *  as the Arduino cannot handle the current the LEDs will require.
     *  Failure to follow this precaution can destroy your Arduino!
     * *** CAUTION ***
     *
     */
    
    //#define RGB_LED
    
    //#define RGBW_LED
    #if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
    
      #define RGB_LED_R_PIN 34
      #define RGB_LED_G_PIN 43
      #define RGB_LED_B_PIN 35
    
      #define RGB_LED_W_PIN -1
    
    /**
     * Printer Event LEDs
     *
     * During printing, the LEDs will reflect the printer status:
     *
     *  - Gradually change from blue to violet as the heated bed gets to target temp
     *  - Gradually change from violet to red as the hotend gets to temperature
     *  - Change to white to illuminate work surface
     *  - Change to green once print has finished
     *  - Turn off after the print has finished and the user has pushed a button
     */
    
    dot-bob's avatar
    dot-bob committed
    #if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)
    
      #define PRINTER_EVENT_LEDS
    #endif
    
    
    /*********************************************************************\
    * R/C SERVO support
    * Sponsored by TrinityLabs, Reworked by codexmas
    **********************************************************************/
    
    // Number of servos
    //
    // If you select a configuration below, this will receive a default value and does not need to be set manually
    // set it manually if you have more servos than extruders and wish to manually control some
    // leaving it undefined or defining as 0 will disable the servo subsystem
    // If unsure, leave commented / disabled
    //
    
    //#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command
    
    // Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
    
    // 300ms is a good value but you can try less delay.
    // If the servo can't reach the requested position, increase it.
    #define SERVO_DELAY 300
    
    
    // Servo deactivation
    //
    // With this option servos are powered only during movement, then turned off to prevent jitter.
    //#define DEACTIVATE_SERVOS_AFTER_MOVE
    
    
    /**
     * Filament Width Sensor
     *
     * Measures the filament width in real-time and adjusts
     * flow rate to compensate for any irregularities.
     *
     * Also allows the measured filament diameter to set the
     * extrusion rate, so the slicer only has to specify the
     * volume.
     *
     * Only a single extruder is supported at this time.
     *
     *  34 RAMPS_14    : Analog input 5 on the AUX2 connector
     *  81 PRINTRBOARD : Analog input 2 on the Exp1 connector (version B,C,D,E)
     * 301 RAMBO       : Analog input 3
     *
     * Note: May require analog pins to be defined for other boards.
     */
    
    //#define FILAMENT_WIDTH_SENSOR
    
    #define DEFAULT_NOMINAL_FILAMENT_DIA 3.00   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
    
    #if ENABLED(FILAMENT_WIDTH_SENSOR)
    
      #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
      #define MEASUREMENT_DELAY_CM        14    // (cm) The distance from the filament sensor to the melting chamber
    
      #define MEASURED_UPPER_LIMIT         3.30 // (mm) Upper limit used to validate sensor reading
      #define MEASURED_LOWER_LIMIT         1.90 // (mm) Lower limit used to validate sensor reading
      #define MAX_MEASUREMENT_DELAY       20    // (bytes) Buffer size for stored measurements (1 byte per cm). Must be larger than MEASUREMENT_DELAY_CM.
    
      #define DEFAULT_MEASURED_FILAMENT_DIA DEFAULT_NOMINAL_FILAMENT_DIA // Set measured to nominal initially
    
      // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
    
      //#define FILAMENT_LCD_DISPLAY
    #endif