Vai al contenuto

Errori di compilazione MK4Duo


 Condividi

Messaggi raccomandati

Ciao a tutti,

Sto installando una minitronics 2.0 con il suo MK4Duo, che sembrerebbe l'unico firmware compatibile.

Dopo aver verificato, ho riscontrato degli errori che non sono riuscito a correggere. Ecco il log degli errori:











ATTENZIONE: la libreria U8glib dichiara di funzionare sulle architetture (avr, sam) e potrebbe non essere compatibile con la tua scheda che utilizza l'architettura (samd)
In file included from sketch\src/inc/sanitycheck.h:120:0,

                 from sketch\MK4duo.h:108,

                 from C:\Users\Alberto\Desktop\Stampa 3D\Altro\Mascio's AM8\Firmware AM8 Minitronics\MK4duo\MK4duo.ino:318:

sketch\src/inc/../feature/probe/sanitycheck.h:77:6: error: #error "DEPENDENCY ERROR: A probe needs a pin! Use Z_MIN_PIN or Z_PROBE_PIN."

     #error "DEPENDENCY ERROR: A probe needs a pin! Use Z_MIN_PIN or Z_PROBE_PIN."

      ^

In file included from sketch\src/platform/platform.h:36:0,

                 from sketch\MK4duo.h:111,

                 from C:\Users\Alberto\Desktop\Stampa 3D\Altro\Mascio's AM8\Firmware AM8 Minitronics\MK4duo\MK4duo.ino:318:

sketch\src/platform/common/servo.h:84:6: error: #error "Unsupported Platform!"

     #error "Unsupported Platform!"

      ^

In file included from sketch\src/feature/bedlevel/bedlevel.h:59:0,

                 from sketch\MK4duo.h:148,

                 from C:\Users\Alberto\Desktop\Stampa 3D\Altro\Mascio's AM8\Firmware AM8 Minitronics\MK4duo\MK4duo.ino:318:

sketch\src/feature/bedlevel/math/vector_3.h:83:2: error: #endif without #if

 #endif /* _VECTOR_3_H_ */

  ^

exit status 1
Errore durante la compilazione per la scheda Minitronics v2.0.

Per quanto riguarda la libreria dello schermo dovrebbe essere a posto, quindi direi di tralasciare quell'avvertimento..

Inserisco anche  i configuration files:

BASIC

/**
 * MK4duo Firmware for 3D Printer, Laser and CNC
 *
 * Based on Marlin, Sprinter and grbl
 * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
 * Copyright (C) 2013 Alberto Cotronei @MagoKimbra
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

/**
 * Configuration_Basic.h
 *
 * This configuration file contains basic settings.
 *
 * - Serial comunication type
 * - Board type
 * - Mechanism type
 * - Extruders number
 *
 * Mechanisms-settings can be found in Configuration_Xxxxxx.h (where Xxxxxx can be: Cartesian - Delta - Core - Scara)
 * Temperature settings can be found in Configuration_Temperature.h
 * Feature-settings can be found in Configuration_Feature.h
 * Pins-settings can be found in "Configuration_Pins.h"
 */

#ifndef _CONFIGURATION_BASIC_H_
#define _CONFIGURATION_BASIC_H_

/***********************************************************************
 ********************** Serial comunication type ***********************
 ***********************************************************************/
/**
 * Select a primary serial port on the board will be used for communication with the host.
 * This allows the connection of wireless adapters (for instance) to non-default port pins.
 * Serial port 0 is always used by the Arduino bootloader regardless of this setting.
 *
 * Valid values are -1 to 3 for Serial, Serial1, Serial2, Serial3 and -1 for SerialUSB
 */
#define SERIAL_PORT_1 -1

/**
 * This setting determines the communication speed of the printer on primary port.
 *
 * 250000 works in most cases, but you might try a lower speed if
 * you commonly experience drop-outs during host printing.
 * You may try up to 1000000 to speed up SD file transfer.
 *
 * 2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000
 */
#define BAUDRATE_1 250000

/**
 * Select a secondary serial port on the board to use for communication with the host.
 * This allows the connection of wireless adapters (for instance) to non-default port pins.
 *
 * Valid values are -1 to 3 for Serial, Serial1, Serial2, Serial3 and -1 for SerialUSB
 * -2 not used
 */
#define SERIAL_PORT_2 -2

/**
 * This setting determines the communication speed of the printer on secondary port.
 *
 * 250000 works in most cases, but you might try a lower speed if
 * you commonly experience drop-outs during host printing.
 * You may try up to 1000000 to speed up SD file transfer.
 *
 * 2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000
 */
#define BAUDRATE_2 250000

/**
 * User-specified version info of this build to display in [Pronterface, etc] terminal window during
 * startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
 * build by the user have been successfully uploaded into firmware.
 */
#define STRING_CONFIG_H_AUTHOR "Alberto"   // Who made the changes.

/**
 * Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
 * You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
 */
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"

/**
 * Kill Method
 *  0 - Disable heaters, wait forever
 *  1 - Reset controller. Will not reset separate communication chips!
 */
#define KILL_METHOD 0

/**
 * Some particular clients re-start sending commands only after receiving a 'wait' when there is a bad serial-connection.
 * Milliseconds
 */
#define NO_TIMEOUTS 1000
// Uncomment to include more info in ok command
//#define ADVANCED_OK

/**
 * Enable an emergency-command parser to intercept certain commands as they
 * enter the serial receive buffer, so they cannot be blocked.
 * Currently handles M108, M112, M410
 */
//#define EMERGENCY_PARSER

/**
 * Spend 28 bytes of SRAM to optimize the GCode parser
 */
//#define FASTER_GCODE_PARSER

/**
 * Spend more bytes of SRAM to optimize the GCode execute
 */
//#define FASTER_GCODE_EXECUTE

/**
 * Host Keepalive
 *
 * When enabled MK4duo will send a busy status message to the host
 * every couple of seconds when it can't accept commands.
 */
// Disable this if your host doesn't like keepalive messages
#define HOST_KEEPALIVE_FEATURE
// Number of seconds between "busy" messages. Set with M113.
#define DEFAULT_KEEPALIVE_INTERVAL 2
/***********************************************************************/


/*****************************************************************************************
 *************************************** Board type **************************************
 *****************************************************************************************
 *                                                                                       *
 * Either an numeric ID or name defined in boards.h is valid.                            *
 * See: https://github.com/MagoKimbra/MK4duo/blob/master/Documentation/Hardware.md *
 *                                                                                       *
 *****************************************************************************************/
#define MOTHERBOARD BOARD_MINITRONICS_V2
/*****************************************************************************************/


/***********************************************************************
 *************************** Mechanism type ****************************
 ***********************************************************************
 *                                                                     *
 * CARTESIAN      - Prusa, Mendel, etc                                 *
 * COREXY         - H-Bot/Core XY (x_motor = x+y, y_motor = x-y)       *
 * COREYX         - H-Bot/Core YX (x_motor = y+x, y_motor = y-x)       *
 * COREXZ         - H-Bot/Core XZ (x_motor = x+z, z_motor = x-z)       *
 * COREZX         - H-Bot/Core ZX (x_motor = z+x, z_motor = z-x)       *
 * COREYZ         - H-Bot/Core YZ (y_motor = y+z, z_motor = y-z)       *
 * COREZY         - H-Bot/Core ZY (y_motor = z+y, z_motor = z-y)       *
 * DELTA          - Rostock, Kossel, RostockMax, Cerberus, etc         *
 * MORGAN_SCARA   - SCARA classic                                      *
 * MAKERARM_SCARA - SCARA Makerfarm                                    *
 *                                                                     *
 ***********************************************************************/
#define MECHANISM MECH_CARTESIAN
//#define MECHANISM MECH_COREXY
//#define MECHANISM MECH_COREYX
//#define MECHANISM MECH_COREXZ
//#define MECHANISM MECH_COREZX
//#define MECHANISM MECH_COREYZ
//#define MECHANISM MECH_COREZY
//#define MECHANISM MECH_DELTA
//#define MECHANISM MECH_MORGAN_SCARA
//#define MECHANISM MECH_MAKERARM_SCARA
//#define MECHANISM MECH_MUVE3D
/***********************************************************************/


/*************************************************************************************
 ************************************ Power supply ***********************************
 *************************************************************************************
 *                                                                                   *
 * The following define selects which power supply you have.                         *
 * Please choose the one that matches your setup and set to POWER_SUPPLY:            *
 * 0 Normal power                                                                    *
 * 1 ATX                                                                             *
 * 2 X-Box 360 203 Watts (the blue wire connected to PS_ON and the red wire to VCC)  *
 *                                                                                   *
 *************************************************************************************/
#define POWER_SUPPLY 0

// Define this to have the electronics keep the power supply off on startup.
// If you don't know what this is leave it.
#define PS_DEFAULT_OFF false
// Define delay after power on in seconds
#define DELAY_AFTER_POWER_ON 5
// Define time for automatic power off if not needed in second
#define POWER_TIMEOUT 30
/*************************************************************************************/


/***********************************************************************
 ************************** Extruders number ***************************
 ***********************************************************************/
// This defines the number of extruder real or virtual
// 0,1,2,3,4,5,6
#define EXTRUDERS 1

// This defines the number of Driver extruder you have and use
// 0,1,2,3,4,5,6
#define DRIVER_EXTRUDERS 1
/***********************************************************************/

#endif /* _CONFIGURATION_BASIC_H_ */

CARTESIAN

/**
 * MK4duo Firmware for 3D Printer, Laser and CNC
 *
 * Based on Marlin, Sprinter and grbl
 * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
 * Copyright (C) 2013 Alberto Cotronei @MagoKimbra
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

/**
 * Configuration_Cartesian.h
 *
 * This configuration file contains mechanism settings for cartesian printer.
 *
 * - Machine name
 * - Endstop pullup resistors
 * - Endstops logic
 * - Endstop Interrupts Feature
 * - Z probe Options
 * - Endstops min or max
 * - Min Z height for homing
 * - Stepper enable logic
 * - Stepper step logic
 * - Stepper direction
 * - Disables axis
 * - Travel limits
 * - Axis relative mode
 * - Bed Leveling
 * - Leveling Fade Height
 * - Safe Z homing
 * - Manual home positions
 * - Axis steps per unit
 * - Axis feedrate
 * - Axis acceleration
 * - Axis jerk
 * - Homing feedrate
 * - Hotend offset
 * - Hysteresis Feature
 *
 * Basic-settings can be found in Configuration_Basic.h
 * Temperature-settings can be found in Configuration_Temperature.h
 * Feature-settings can be found in Configuration_Feature.h
 * Pins-settings can be found in "Configuration_Pins.h"
 */

#ifndef _CONFIGURATION_CARTESIAN_H_
#define _CONFIGURATION_CARTESIAN_H_

#define KNOWN_MECH

/*****************************************************************************************
 *********************************** Machine name ****************************************
 *****************************************************************************************
 *                                                                                       *
 * This to set a custom name for your generic Mendel.                                    *
 * Displayed in the LCD "Ready" message.                                                 *
 *                                                                                       *
 *****************************************************************************************/
#define CUSTOM_MACHINE_NAME "Mascio's AM8"
/*****************************************************************************************/


/*****************************************************************************************
 ************************* Endstop pullup resistors **************************************
 *****************************************************************************************
 *                                                                                       *
 * Put true for enable or put false for disable the endstop pullup resistors             *
 *                                                                                       *
 *****************************************************************************************/
#define ENDSTOPPULLUP_XMIN    true
#define ENDSTOPPULLUP_YMIN    true
#define ENDSTOPPULLUP_ZMIN    false
#define ENDSTOPPULLUP_XMAX    false
#define ENDSTOPPULLUP_YMAX    false
#define ENDSTOPPULLUP_ZMAX    false
#define ENDSTOPPULLUP_X2MIN   false
#define ENDSTOPPULLUP_Y2MIN   false
#define ENDSTOPPULLUP_Z2MIN   false
#define ENDSTOPPULLUP_Z3MIN   false
#define ENDSTOPPULLUP_X2MAX   false
#define ENDSTOPPULLUP_Y2MAX   false
#define ENDSTOPPULLUP_Z2MAX   false
#define ENDSTOPPULLUP_Z3MAX   false
#define ENDSTOPPULLUP_ZPROBE  true
/*****************************************************************************************/


/*****************************************************************************************
 ************************************ Endstops logic *************************************
 *****************************************************************************************
 *                                                                                       *
 * Mechanical endstop with COM to ground and NC to Signal                                *
 * uses "false" here (most common setup).                                                *
 *                                                                                       *
 *****************************************************************************************/
#define X_MIN_ENDSTOP_LOGIC   true   // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_LOGIC   true   // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_LOGIC   true   // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_LOGIC   false   // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_LOGIC   false   // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_LOGIC   false   // set to true to invert the logic of the endstop.
#define X2_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Y2_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z2_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z3_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define X2_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Y2_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z2_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z3_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z_PROBE_ENDSTOP_LOGIC false   // set to true to invert the logic of the probe.
/*****************************************************************************************/


/*****************************************************************************************
 ***************************** Endstop interrupts feature ********************************
 *****************************************************************************************
 *                                                                                       *
 * Enable this feature if all enabled endstop pins are interrupt-capable.                *
 * This will remove the need to poll the interrupt pins, saving many CPU cycles.         *
 *                                                                                       *
 *****************************************************************************************/
//#define ENDSTOP_INTERRUPTS_FEATURE
/*****************************************************************************************/


/*****************************************************************************************
 ******************************* Z probe Options *****************************************
 *****************************************************************************************
 *                                                                                       *
 * Probes are sensors/switches that need to be activated before they can be used         *
 * and deactivated after their use.                                                      *
 * Servo Probes, Z Sled Probe, Fix mounted Probe, etc.                                   *
 * You must activate one of these to use AUTO BED LEVELING FEATURE below.                *
 *                                                                                       *
 * If you want to still use the Z min endstop for homing,                                *
 * disable Z SAFE HOMING.                                                                *
 * Eg: to park the head outside the bed area when homing with G28.                       *
 *                                                                                       *
 * WARNING: The Z MIN endstop will need to set properly as it would                      *
 * without a Z PROBE to prevent head crashes and premature stopping                      *
 * during a print.                                                                       *
 * To use a separte Z PROBE endstop, you must have a Z PROBE PIN                         *
 * defined in the Configuration_Pins.h file for your control board.                      *
 *                                                                                       *
 * Use M851 X Y Z to set the probe offset from the nozzle. Store with M500.              *
 * WARNING: Setting the wrong pin may have unexpected and potentially                    *
 * disastrous outcomes. Use with caution and do your homework.                           *
 *                                                                                       *
 *****************************************************************************************/
// Z Servo Endstop
// Remember active servos in Configuration_Feature.h
// Define nr servo for endstop -1 not define. Servo index start 0
#define Z_PROBE_SERVO_NR 0
#define Z_SERVO_ANGLES {90,0} // Z Servo Deploy and Stow angles

// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
// Use Host or LCD for adjust Z height.
//#define PROBE_MANUALLY

// A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
// For example an inductive probe, or a setup that uses the nozzle to probe.
// An inductive probe must be deactivated to go below
// its trigger-point if hardware endstops are active.
//#define Z_PROBE_FIX_MOUNTED

// The BLTouch probe uses a Hall effect sensor and emulates a servo.
// The default connector is SERVO 0.
#define BLTOUCH
#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed

// If you have TMC2130 or TMC5130 you can use StallGuard2 to probe the bed with the nozzle.
//
// CAUTION: This could cause damage to machines that use a lead screw or threaded rod
//          to move the Z axis. Take extreme care when attempting to enable this feature.
//
//#define Z_PROBE_SENSORLESS

// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
//#define Z_PROBE_SLED
// The extra distance the X axis must travel to pick up the sled.
// 0 should be fine but you can push it further if you'd like.
#define SLED_DOCKING_OFFSET 5

// Offsets to the probe relative to the nozzle tip (Nozzle - Probe)
// X and Y offsets MUST be INTEGERS
//
//    +-- BACK ---+
//    |           |
//  L |    (+) P  | R <-- probe (10,10)
//  E |           | I
//  F | (-) N (+) | G <-- nozzle (0,0)
//  T |           | H
//    |  P (-)    | T <-- probe (-10,-10)
//    |           |
//    O-- FRONT --+
//  (0,0)
#define X_PROBE_OFFSET_FROM_NOZZLE  -34    // X offset: -left  [of the nozzle] +right
#define Y_PROBE_OFFSET_FROM_NOZZLE  -3    // Y offset: -front [of the nozzle] +behind
#define Z_PROBE_OFFSET_FROM_NOZZLE -1     // Z offset: -below [of the nozzle] (always negative!)

// X and Y axis travel speed between probes, in mm/min
#define XY_PROBE_SPEED 10000
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
#define Z_PROBE_SPEED_FAST 120
// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW 60
// Z Probe repetitions, median for best result
#define Z_PROBE_REPETITIONS 1

// Enable Z Probe Repeatability test to see how accurate your probe is
//#define Z_MIN_PROBE_REPEATABILITY_TEST

// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW

// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
#define Z_PROBE_DEPLOY_HEIGHT 15  // Z position for the probe to deploy/stow
#define Z_PROBE_BETWEEN_HEIGHT 5  // Z position for travel between points
#define Z_PROBE_AFTER_PROBING  0  // Z position after probing is done

// For M851 give a range for adjusting the Probe Z Offset
#define Z_PROBE_OFFSET_RANGE_MIN -50
#define Z_PROBE_OFFSET_RANGE_MAX  50

// Enable if probing seems unreliable. Heaters and/or fans - consistent with the
// options selected below - will be disabled during probing so as to minimize
// potential EM interference by quieting/silencing the source of the 'noise' (the change
// in current flowing through the wires). This is likely most useful to users of the
// BLTouch probe, but may also help those with inductive or other probe types.
//#define PROBING_HEATERS_OFF       // Turn heaters off when probing
//#define PROBING_FANS_OFF          // Turn fans off when probing

// Use the LCD controller for bed leveling
// Requires MESH BED LEVELING or PROBE MANUALLY
//#define LCD_BED_LEVELING
#define LCD_Z_STEP 0.025    // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z MIN POS for LCD Z adjustment

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
#define LEVEL_CORNERS_INSET 30    // (mm) An inset for corner leveling
//#define LEVEL_CENTER_TOO        // Move to the center after the last corner
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Endstops min or max **********************************
 *****************************************************************************************
 *                                                                                       *
 * Sets direction of endstop when homing; 1=MAX, -1=MIN                                  *
 *                                                                                       *
 *****************************************************************************************/
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
/*****************************************************************************************/


/*****************************************************************************************
 ***************************** MIN Z HEIGHT FOR HOMING **********************************
 *****************************************************************************************
 *                                                                                       *
 * (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps,   *
 * Be sure you have this distance over your Z MAX POS in case.                           *
 *                                                                                       *
 *****************************************************************************************/
#define MIN_Z_HEIGHT_FOR_HOMING 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************* Stepper enable logic **********************************
 *****************************************************************************************
 *                                                                                       *
 * For Inverting Stepper Enable Pins                                                     *
 * (Active Low) use 0                                                                    *
 * Non Inverting (Active High) use 1                                                     *
 *                                                                                       *
 *****************************************************************************************/
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************* Stepper step logic **********************************
 *****************************************************************************************
 *                                                                                       *
 * By default pololu step drivers require an active high signal.                         *
 * However, some high power drivers require an active low signal as step.                *
 *                                                                                       *
 *****************************************************************************************/
#define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false
#define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Stepper direction ************************************
 *****************************************************************************************
 *                                                                                       *
 * Invert the stepper direction.                                                         *
 * Change (or reverse the motor connector) if an axis goes the wrong way.                *
 *                                                                                       *
 *****************************************************************************************/
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
#define INVERT_E0_DIR false
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false
#define INVERT_E5_DIR false
/*****************************************************************************************/


/*****************************************************************************************
 ************************************* Disables axis *************************************
 *****************************************************************************************
 *                                                                                       *
 * Disables axis when it's not being used.                                               *
 *                                                                                       *
 *****************************************************************************************/
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false
// Disable only inactive extruder and keep active extruder enabled
//#define DISABLE_INACTIVE_EXTRUDER
/*****************************************************************************************/


/*****************************************************************************************
 ************************************ Travel limits **************************************
 *****************************************************************************************
 *                                                                                       *
 * Travel limits after homing (units are in mm)                                          *
 *                                                                                       *
 *****************************************************************************************/
#define X_MAX_POS 240
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS 0
#define Z_MAX_POS 220
#define Z_MIN_POS 0
#define E_MIN_POS 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Axis relative mode ***********************************
 *****************************************************************************************/
#define AXIS_RELATIVE_MODES {false, false, false, false}
/*****************************************************************************************/


/*****************************************************************************************
 *********************************** Safe Z homing ***************************************
 *****************************************************************************************
 *                                                                                       *
 * If you have enabled the auto bed levelling feature or are using                       *
 * Z Probe for Z Homing, it is highly recommended you let                                *
 * this Z_SAFE_HOMING enabled!!!                                                         *
 *                                                                                       *
 * X point for Z homing when homing all axis (G28)                                       *
 * Y point for Z homing when homing all axis (G28)                                       *
 *                                                                                       *
 * Uncomment Z_SAFE_HOMING to enable                                                     *
 *                                                                                       *
 *****************************************************************************************/
//#define Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Bed Leveling *****************************************
 *****************************************************************************************
 *                                                                                       *
 * Select one from of Bed Leveling below.                                                *
 *                                                                                       *
 *  If you're also using the Probe for Z Homing, it's                                    *
 *  highly recommended to enable Z SAFE HOMING also!                                     *
 *                                                                                       *
 * - MESH                                                                                *
 *   Probe a grid manually                                                               *
 *   The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)            *
 *   For machines without a probe, Mesh Bed Leveling provides a method to perform        *
 *   leveling in steps so you can manually adjust the Z height at each grid-point.       *
 *   With an LCD controller the process is guided step-by-step.                          *
 *                                                                                       *
 * - UBL (Unified Bed Leveling)                                                          *
 *   A comprehensive bed leveling system combining the features and benefits             *
 *   of other systems. UBL also includes integrated Mesh Generation, Mesh                *
 *   Validation and Mesh Editing systems.                                                *
 *                                                                                       *
 * - LINEAR                                                                              *
 *   Probe several points in a grid.                                                     *
 *   You specify the rectangle and the density of sample points.                         *
 *   The result is a single tilted plane. Best for a flat bed.                           *
 *                                                                                       *
 * - BILINEAR                                                                            *
 *   Probe several points in a grid.                                                     *
 *   You specify the rectangle and the density of sample points.                         *
 *   The result is a grid, best for large or uneven beds.                                *
 *                                                                                       *
 * - 3POINT                                                                              *
 *   Probe 3 arbitrary points on the bed (that aren't collinear)                         *
 *   You specify the XY coordinates of all 3 points.                                     *
 *   The result is a single tilted plane. Best for a flat bed.                           *
 *                                                                                       *
 *****************************************************************************************/
//#define MESH_BED_LEVELING
//#define AUTO_BED_LEVELING_UBL
#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_3POINT

// enable a graphics overly while editing the mesh from auto-level
//#define MESH_EDIT_GFX_OVERLAY

// Mesh inset margin on print area
#define MESH_INSET 10

// Enable the G26 Mesh Validation Pattern tool.
//#define G26_MESH_VALIDATION
#define MESH_TEST_NOZZLE_SIZE    0.4  // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT   0.2  // (mm) Default layer height for the G26 Mesh Validation Tool.
#define MESH_TEST_HOTEND_TEMP  200.0  // (c)  Default nozzle temperature for the G26 Mesh Validation Tool.
#define MESH_TEST_BED_TEMP      60.0  // (c)  Default bed temperature for the G26 Mesh Validation Tool.

/** START MESH BED LEVELING **/
// Default mesh area is an area with an inset margin on the print area.
// Below are the macros that are used to define the borders for the mesh
// area, made available here for specialized needs.
#define MESH_MIN_X (X_MIN_POS + (MESH_INSET))
#define MESH_MAX_X (X_MAX_POS - (MESH_INSET))
#define MESH_MIN_Y (Y_MIN_POS + (MESH_INSET))
#define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))

// After homing all axes ('G28' or 'G28 XYZ') rest Z at Z MIN POS
//#define MESH_G28_REST_ORIGIN
/** END MESH BED LEVELING **/

/** START UNIFIED BED LEVELING **/
// Default mesh area is an area with an inset margin on the print area.
// Below are the macros that are used to define the borders for the mesh area,
// made available here for specialized needs, ie dual extruder setup.
#define UBL_MESH_MIN_X (X_MIN_POS + (MESH_INSET))
#define UBL_MESH_MAX_X (X_MAX_POS - (MESH_INSET))
#define UBL_MESH_MIN_Y (Y_MIN_POS + (MESH_INSET))
#define UBL_MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))

// Sophisticated users prefer no movement of nozzle
#define UBL_MESH_EDIT_MOVES_Z

// Save the currently active mesh in the current slot on M500
#define UBL_SAVE_ACTIVE_ON_M500

// When the nozzle is off the mesh, this value is used as the Z-Height correction value.
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5
/** END UNIFIED BED LEVELING **/

/** START MESH BED LEVELING or AUTO BED LEVELING LINEAR or AUTO BED LEVELING BILINEAR or UNIFIED BED LEVELING **/
// Set the number of grid points per dimension
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_Y 3
/** END MESH BED LEVELING or AUTO BED LEVELING LINEAR or AUTO BED LEVELING BILINEAR or UNIFIED BED LEVELING **/

/** START AUTO BED LEVELING LINEAR or AUTO BED LEVELING BILINEAR **/
// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 190
#define FRONT_PROBE_BED_POSITION 15
#define BACK_PROBE_BED_POSITION 190

// The Z probe minimum outer margin (to validate G29 parameters).
#define MIN_PROBE_EDGE 10

// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST

// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.
//#define ABL_BILINEAR_SUBDIVISION
// Number of subdivisions between probe points
#define BILINEAR_SUBDIVISIONS 3
/** END AUTO_BED_LEVELING_LINEAR or AUTO_BED_LEVELING_BILINEAR **/

/** START AUTO_BED_LEVELING_3POINT or UNIFIED BED LEVELING **/
// 3 arbitrary points to probe.
// A simple cross-product is used to estimate the plane of the bed.
#define PROBE_PT_1_X 15
#define PROBE_PT_1_Y 190
#define PROBE_PT_2_X 15
#define PROBE_PT_2_Y 15
#define PROBE_PT_3_X 220
#define PROBE_PT_3_Y 15
/** END AUTO_BED_LEVELING_3POINT or UNIFIED BED LEVELING **/

// Commands to execute at the end of G29 probing.
// Useful to retract or move the Z probe out of the way.
//#define Z_PROBE_END_SCRIPT "G1 Z10 F8000\nG1 X10 Y10\nG1 Z0.5"
/*****************************************************************************************/


/*****************************************************************************************
 ************************** Leveling Fade Height (MBL or ABL) ****************************
 *****************************************************************************************
 *                                                                                       *
 * Gradually reduce leveling correction until a set height is reached,                   *
 * at which point movement will be level to the machine's XY plane.                      *
 * The height can be set with M420 Z<height> for MBL or M320 Z<height> for ABL           *
 * ONLY FOR LEVELING BILINEAR OR MESH BED LEVELING                                       *
 *                                                                                       *
 *****************************************************************************************/
//#define ENABLE_LEVELING_FADE_HEIGHT
/*****************************************************************************************/


/*****************************************************************************************
 ******************************** Manual home positions **********************************
 *****************************************************************************************/
// The center of the bed is at (X=0, Y=0)
//#define BED_CENTER_AT_0_0

// Manually set the home position. Leave these undefined for automatic settings.
//#define MANUAL_X_HOME_POS 0
//#define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************* Movement Settings *************************************
 *****************************************************************************************
 *                                                                                       *
 * Default Settings                                                                      *
 *                                                                                       *
 * These settings can be reset by M502                                                   *
 *                                                                                       *
 * Note that if EEPROM is enabled, saved values will override these.                     *
 *                                                                                       *
 *****************************************************************************************/


/*****************************************************************************************
 ******************************* Axis steps per unit *************************************
 *****************************************************************************************
 *                                                                                       *
 * Default Axis Steps Per Unit (steps/mm)                                                *
 * Override with M92                                                                     *
 *                                                                                       *
 *****************************************************************************************/
// Default steps per unit               X,  Y,    Z,  E0...(per extruder)
#define DEFAULT_AXIS_STEPS_PER_UNIT   {200, 200, 800, 838, 625, 625, 625}
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Axis feedrate ****************************************
 *****************************************************************************************/
//                                       X,   Y, Z,  E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_FEEDRATE          {300, 300, 2, 100, 100, 100, 100}
// Feedrates for manual moves along        X,     Y,     Z,  E from panel
#define MANUAL_FEEDRATE               {50*60, 50*60, 4*60, 10*60}
// Minimum feedrate
#define DEFAULT_MIN_FEEDRATE          0.0
#define DEFAULT_MIN_TRAVEL_FEEDRATE   0.0
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
// of the buffer and all stops. This should not be much greater than zero and should only be changed
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED         0.05                      // (mm/sec)
/*****************************************************************************************/


/*****************************************************************************************
 ******************************** Axis acceleration **************************************
 *****************************************************************************************/
//  Maximum start speed for accelerated moves.    X,    Y,  Z,   E0...(per extruder)
#define DEFAULT_MAX_ACCELERATION              {3000, 3000, 100, 5000, 5000, 5000, 5000}
//  Maximum acceleration in mm/s^2 for retracts   E0... (per extruder)
#define DEFAULT_RETRACT_ACCELERATION          {5000, 5000, 5000, 5000}
//  X, Y, Z and E* maximum acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION          3000
//  X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
#define DEFAULT_TRAVEL_ACCELERATION   3000
/*****************************************************************************************/


/*****************************************************************************************
 ************************************* Axis jerk *****************************************
 *****************************************************************************************
 *                                                                                       *
 * Default Jerk (mm/s)                                                                   *
 * Override with M205 X Y Z E                                                            *
 *                                                                                       *
 * "Jerk" specifies the minimum speed change that requires acceleration.                 *
 * When changing speed and direction, if the difference is less than the                 *
 * value set here, it may happen instantaneously.                                        *
 *                                                                                       *
 *****************************************************************************************/
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK  0.4
// E0... (mm/sec) per extruder
#define DEFAULT_EJERK                   {5.0, 5.0, 5.0, 5.0}
/*****************************************************************************************/


/*****************************************************************************************
 ************************************ Homing feedrate ************************************
 *****************************************************************************************/
// Homing speeds (mm/m)
#define HOMING_FEEDRATE_X (50*60)
#define HOMING_FEEDRATE_Y (50*60)
#define HOMING_FEEDRATE_Z (2*60)

// Homing hits each endstop, retracts by these distances, then does a slower bump.
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 2

// Re-Bump Speed Divisor (Divides the Homing Feedrate)
#define HOMING_BUMP_DIVISOR {5, 5, 2}
/*****************************************************************************************/


/*****************************************************************************************
 *********************************** Hotend offset ***************************************
 *****************************************************************************************
 *                                                                                       *
 * Offset of the hotends (uncomment if using more than one and relying on firmware       *
 * to position when changing).                                                           *
 * The offset has to be X=0, Y=0, Z=0 for the hotend 0 (default hotend).                 *
 * For the other hotends it is their distance from the hotend 0.                         *
 *                                                                                       *
 *****************************************************************************************/
#define HOTEND_OFFSET_X {0.0, 0.0, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the X axis
#define HOTEND_OFFSET_Y {0.0, 0.0, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Y axis
#define HOTEND_OFFSET_Z {0.0, 0.0, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Z axis
/*****************************************************************************************/


/*****************************************************************************************
 ******************************** Hysteresis Feature *************************************
 *****************************************************************************************
 *                                                                                       *
 * Hysteresis:                                                                           *
 * These are the extra distances that are performed when an axis changes direction       *
 * to compensate for any mechanical hysteresis your printer has.                         *
 * Set the parameters with M99 X<in mm> Y<in mm> Z<in mm>                                *
 *                                                                                       *
 *****************************************************************************************/
//#define HYSTERESIS_FEATURE

// Define values for hysteresis distance and correction.
#define HYSTERESIS_AXIS_MM    { 0, 0, 0 } // mm
#define HYSTERESIS_CORRECTION 0.0         // 0.0 = no correction; 1.0 = full correction
/*****************************************************************************************/

#endif /* _CONFIGURATION_CARTESIAN_H_ */

FEATURE

/**
 * MK4duo Firmware for 3D Printer, Laser and CNC
 *
 * Based on Marlin, Sprinter and grbl
 * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
 * Copyright (C) 2013 Alberto Cotronei @MagoKimbra
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

/**
 * Configuration_Cartesian.h
 *
 * This configuration file contains mechanism settings for cartesian printer.
 *
 * - Machine name
 * - Endstop pullup resistors
 * - Endstops logic
 * - Endstop Interrupts Feature
 * - Z probe Options
 * - Endstops min or max
 * - Min Z height for homing
 * - Stepper enable logic
 * - Stepper step logic
 * - Stepper direction
 * - Disables axis
 * - Travel limits
 * - Axis relative mode
 * - Bed Leveling
 * - Leveling Fade Height
 * - Safe Z homing
 * - Manual home positions
 * - Axis steps per unit
 * - Axis feedrate
 * - Axis acceleration
 * - Axis jerk
 * - Homing feedrate
 * - Hotend offset
 * - Hysteresis Feature
 *
 * Basic-settings can be found in Configuration_Basic.h
 * Temperature-settings can be found in Configuration_Temperature.h
 * Feature-settings can be found in Configuration_Feature.h
 * Pins-settings can be found in "Configuration_Pins.h"
 */

#ifndef _CONFIGURATION_CARTESIAN_H_
#define _CONFIGURATION_CARTESIAN_H_

#define KNOWN_MECH

/*****************************************************************************************
 *********************************** Machine name ****************************************
 *****************************************************************************************
 *                                                                                       *
 * This to set a custom name for your generic Mendel.                                    *
 * Displayed in the LCD "Ready" message.                                                 *
 *                                                                                       *
 *****************************************************************************************/
#define CUSTOM_MACHINE_NAME "Mascio's AM8"
/*****************************************************************************************/


/*****************************************************************************************
 ************************* Endstop pullup resistors **************************************
 *****************************************************************************************
 *                                                                                       *
 * Put true for enable or put false for disable the endstop pullup resistors             *
 *                                                                                       *
 *****************************************************************************************/
#define ENDSTOPPULLUP_XMIN    true
#define ENDSTOPPULLUP_YMIN    true
#define ENDSTOPPULLUP_ZMIN    false
#define ENDSTOPPULLUP_XMAX    false
#define ENDSTOPPULLUP_YMAX    false
#define ENDSTOPPULLUP_ZMAX    false
#define ENDSTOPPULLUP_X2MIN   false
#define ENDSTOPPULLUP_Y2MIN   false
#define ENDSTOPPULLUP_Z2MIN   false
#define ENDSTOPPULLUP_Z3MIN   false
#define ENDSTOPPULLUP_X2MAX   false
#define ENDSTOPPULLUP_Y2MAX   false
#define ENDSTOPPULLUP_Z2MAX   false
#define ENDSTOPPULLUP_Z3MAX   false
#define ENDSTOPPULLUP_ZPROBE  true
/*****************************************************************************************/


/*****************************************************************************************
 ************************************ Endstops logic *************************************
 *****************************************************************************************
 *                                                                                       *
 * Mechanical endstop with COM to ground and NC to Signal                                *
 * uses "false" here (most common setup).                                                *
 *                                                                                       *
 *****************************************************************************************/
#define X_MIN_ENDSTOP_LOGIC   true   // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_LOGIC   true   // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_LOGIC   true   // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_LOGIC   false   // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_LOGIC   false   // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_LOGIC   false   // set to true to invert the logic of the endstop.
#define X2_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Y2_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z2_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z3_MIN_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define X2_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Y2_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z2_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z3_MAX_ENDSTOP_LOGIC  false   // set to true to invert the logic of the endstop.
#define Z_PROBE_ENDSTOP_LOGIC false   // set to true to invert the logic of the probe.
/*****************************************************************************************/


/*****************************************************************************************
 ***************************** Endstop interrupts feature ********************************
 *****************************************************************************************
 *                                                                                       *
 * Enable this feature if all enabled endstop pins are interrupt-capable.                *
 * This will remove the need to poll the interrupt pins, saving many CPU cycles.         *
 *                                                                                       *
 *****************************************************************************************/
//#define ENDSTOP_INTERRUPTS_FEATURE
/*****************************************************************************************/


/*****************************************************************************************
 ******************************* Z probe Options *****************************************
 *****************************************************************************************
 *                                                                                       *
 * Probes are sensors/switches that need to be activated before they can be used         *
 * and deactivated after their use.                                                      *
 * Servo Probes, Z Sled Probe, Fix mounted Probe, etc.                                   *
 * You must activate one of these to use AUTO BED LEVELING FEATURE below.                *
 *                                                                                       *
 * If you want to still use the Z min endstop for homing,                                *
 * disable Z SAFE HOMING.                                                                *
 * Eg: to park the head outside the bed area when homing with G28.                       *
 *                                                                                       *
 * WARNING: The Z MIN endstop will need to set properly as it would                      *
 * without a Z PROBE to prevent head crashes and premature stopping                      *
 * during a print.                                                                       *
 * To use a separte Z PROBE endstop, you must have a Z PROBE PIN                         *
 * defined in the Configuration_Pins.h file for your control board.                      *
 *                                                                                       *
 * Use M851 X Y Z to set the probe offset from the nozzle. Store with M500.              *
 * WARNING: Setting the wrong pin may have unexpected and potentially                    *
 * disastrous outcomes. Use with caution and do your homework.                           *
 *                                                                                       *
 *****************************************************************************************/
// Z Servo Endstop
// Remember active servos in Configuration_Feature.h
// Define nr servo for endstop -1 not define. Servo index start 0
#define Z_PROBE_SERVO_NR 0
#define Z_SERVO_ANGLES {90,0} // Z Servo Deploy and Stow angles

// The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe.
// Use Host or LCD for adjust Z height.
//#define PROBE_MANUALLY

// A Fix-Mounted Probe either doesn't deploy or needs manual deployment.
// For example an inductive probe, or a setup that uses the nozzle to probe.
// An inductive probe must be deactivated to go below
// its trigger-point if hardware endstops are active.
//#define Z_PROBE_FIX_MOUNTED

// The BLTouch probe uses a Hall effect sensor and emulates a servo.
// The default connector is SERVO 0.
#define BLTOUCH
#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed

// If you have TMC2130 or TMC5130 you can use StallGuard2 to probe the bed with the nozzle.
//
// CAUTION: This could cause damage to machines that use a lead screw or threaded rod
//          to move the Z axis. Take extreme care when attempting to enable this feature.
//
//#define Z_PROBE_SENSORLESS

// Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
//#define Z_PROBE_SLED
// The extra distance the X axis must travel to pick up the sled.
// 0 should be fine but you can push it further if you'd like.
#define SLED_DOCKING_OFFSET 5

// Offsets to the probe relative to the nozzle tip (Nozzle - Probe)
// X and Y offsets MUST be INTEGERS
//
//    +-- BACK ---+
//    |           |
//  L |    (+) P  | R <-- probe (10,10)
//  E |           | I
//  F | (-) N (+) | G <-- nozzle (0,0)
//  T |           | H
//    |  P (-)    | T <-- probe (-10,-10)
//    |           |
//    O-- FRONT --+
//  (0,0)
#define X_PROBE_OFFSET_FROM_NOZZLE  -34    // X offset: -left  [of the nozzle] +right
#define Y_PROBE_OFFSET_FROM_NOZZLE  -3    // Y offset: -front [of the nozzle] +behind
#define Z_PROBE_OFFSET_FROM_NOZZLE -1     // Z offset: -below [of the nozzle] (always negative!)

// X and Y axis travel speed between probes, in mm/min
#define XY_PROBE_SPEED 10000
// Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
#define Z_PROBE_SPEED_FAST 120
// Speed for the "accurate" probe of each point
#define Z_PROBE_SPEED_SLOW 60
// Z Probe repetitions, median for best result
#define Z_PROBE_REPETITIONS 1

// Enable Z Probe Repeatability test to see how accurate your probe is
//#define Z_MIN_PROBE_REPEATABILITY_TEST

// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW

// Probe Raise options provide clearance for the probe to deploy, stow, and travel.
#define Z_PROBE_DEPLOY_HEIGHT 15  // Z position for the probe to deploy/stow
#define Z_PROBE_BETWEEN_HEIGHT 5  // Z position for travel between points
#define Z_PROBE_AFTER_PROBING  0  // Z position after probing is done

// For M851 give a range for adjusting the Probe Z Offset
#define Z_PROBE_OFFSET_RANGE_MIN -50
#define Z_PROBE_OFFSET_RANGE_MAX  50

// Enable if probing seems unreliable. Heaters and/or fans - consistent with the
// options selected below - will be disabled during probing so as to minimize
// potential EM interference by quieting/silencing the source of the 'noise' (the change
// in current flowing through the wires). This is likely most useful to users of the
// BLTouch probe, but may also help those with inductive or other probe types.
//#define PROBING_HEATERS_OFF       // Turn heaters off when probing
//#define PROBING_FANS_OFF          // Turn fans off when probing

// Use the LCD controller for bed leveling
// Requires MESH BED LEVELING or PROBE MANUALLY
//#define LCD_BED_LEVELING
#define LCD_Z_STEP 0.025    // Step size while manually probing Z axis.
#define LCD_PROBE_Z_RANGE 4 // Z Range centered on Z MIN POS for LCD Z adjustment

// Add a menu item to move between bed corners for manual bed adjustment
//#define LEVEL_BED_CORNERS
#define LEVEL_CORNERS_INSET 30    // (mm) An inset for corner leveling
//#define LEVEL_CENTER_TOO        // Move to the center after the last corner
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Endstops min or max **********************************
 *****************************************************************************************
 *                                                                                       *
 * Sets direction of endstop when homing; 1=MAX, -1=MIN                                  *
 *                                                                                       *
 *****************************************************************************************/
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1
/*****************************************************************************************/


/*****************************************************************************************
 ***************************** MIN Z HEIGHT FOR HOMING **********************************
 *****************************************************************************************
 *                                                                                       *
 * (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps,   *
 * Be sure you have this distance over your Z MAX POS in case.                           *
 *                                                                                       *
 *****************************************************************************************/
#define MIN_Z_HEIGHT_FOR_HOMING 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************* Stepper enable logic **********************************
 *****************************************************************************************
 *                                                                                       *
 * For Inverting Stepper Enable Pins                                                     *
 * (Active Low) use 0                                                                    *
 * Non Inverting (Active High) use 1                                                     *
 *                                                                                       *
 *****************************************************************************************/
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0
#define E_ENABLE_ON 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************* Stepper step logic **********************************
 *****************************************************************************************
 *                                                                                       *
 * By default pololu step drivers require an active high signal.                         *
 * However, some high power drivers require an active low signal as step.                *
 *                                                                                       *
 *****************************************************************************************/
#define INVERT_X_STEP_PIN false
#define INVERT_Y_STEP_PIN false
#define INVERT_Z_STEP_PIN false
#define INVERT_E_STEP_PIN false
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Stepper direction ************************************
 *****************************************************************************************
 *                                                                                       *
 * Invert the stepper direction.                                                         *
 * Change (or reverse the motor connector) if an axis goes the wrong way.                *
 *                                                                                       *
 *****************************************************************************************/
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true
#define INVERT_E0_DIR false
#define INVERT_E1_DIR false
#define INVERT_E2_DIR false
#define INVERT_E3_DIR false
#define INVERT_E4_DIR false
#define INVERT_E5_DIR false
/*****************************************************************************************/


/*****************************************************************************************
 ************************************* Disables axis *************************************
 *****************************************************************************************
 *                                                                                       *
 * Disables axis when it's not being used.                                               *
 *                                                                                       *
 *****************************************************************************************/
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false
// Disable only inactive extruder and keep active extruder enabled
//#define DISABLE_INACTIVE_EXTRUDER
/*****************************************************************************************/


/*****************************************************************************************
 ************************************ Travel limits **************************************
 *****************************************************************************************
 *                                                                                       *
 * Travel limits after homing (units are in mm)                                          *
 *                                                                                       *
 *****************************************************************************************/
#define X_MAX_POS 240
#define X_MIN_POS 0
#define Y_MAX_POS 210
#define Y_MIN_POS 0
#define Z_MAX_POS 220
#define Z_MIN_POS 0
#define E_MIN_POS 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Axis relative mode ***********************************
 *****************************************************************************************/
#define AXIS_RELATIVE_MODES {false, false, false, false}
/*****************************************************************************************/


/*****************************************************************************************
 *********************************** Safe Z homing ***************************************
 *****************************************************************************************
 *                                                                                       *
 * If you have enabled the auto bed levelling feature or are using                       *
 * Z Probe for Z Homing, it is highly recommended you let                                *
 * this Z_SAFE_HOMING enabled!!!                                                         *
 *                                                                                       *
 * X point for Z homing when homing all axis (G28)                                       *
 * Y point for Z homing when homing all axis (G28)                                       *
 *                                                                                       *
 * Uncomment Z_SAFE_HOMING to enable                                                     *
 *                                                                                       *
 *****************************************************************************************/
//#define Z_SAFE_HOMING
#define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2)
#define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2)
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Bed Leveling *****************************************
 *****************************************************************************************
 *                                                                                       *
 * Select one from of Bed Leveling below.                                                *
 *                                                                                       *
 *  If you're also using the Probe for Z Homing, it's                                    *
 *  highly recommended to enable Z SAFE HOMING also!                                     *
 *                                                                                       *
 * - MESH                                                                                *
 *   Probe a grid manually                                                               *
 *   The result is a mesh, suitable for large or uneven beds. (See BILINEAR.)            *
 *   For machines without a probe, Mesh Bed Leveling provides a method to perform        *
 *   leveling in steps so you can manually adjust the Z height at each grid-point.       *
 *   With an LCD controller the process is guided step-by-step.                          *
 *                                                                                       *
 * - UBL (Unified Bed Leveling)                                                          *
 *   A comprehensive bed leveling system combining the features and benefits             *
 *   of other systems. UBL also includes integrated Mesh Generation, Mesh                *
 *   Validation and Mesh Editing systems.                                                *
 *                                                                                       *
 * - LINEAR                                                                              *
 *   Probe several points in a grid.                                                     *
 *   You specify the rectangle and the density of sample points.                         *
 *   The result is a single tilted plane. Best for a flat bed.                           *
 *                                                                                       *
 * - BILINEAR                                                                            *
 *   Probe several points in a grid.                                                     *
 *   You specify the rectangle and the density of sample points.                         *
 *   The result is a grid, best for large or uneven beds.                                *
 *                                                                                       *
 * - 3POINT                                                                              *
 *   Probe 3 arbitrary points on the bed (that aren't collinear)                         *
 *   You specify the XY coordinates of all 3 points.                                     *
 *   The result is a single tilted plane. Best for a flat bed.                           *
 *                                                                                       *
 *****************************************************************************************/
//#define MESH_BED_LEVELING
//#define AUTO_BED_LEVELING_UBL
#define AUTO_BED_LEVELING_LINEAR
//#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_3POINT

// enable a graphics overly while editing the mesh from auto-level
//#define MESH_EDIT_GFX_OVERLAY

// Mesh inset margin on print area
#define MESH_INSET 10

// Enable the G26 Mesh Validation Pattern tool.
//#define G26_MESH_VALIDATION
#define MESH_TEST_NOZZLE_SIZE    0.4  // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT   0.2  // (mm) Default layer height for the G26 Mesh Validation Tool.
#define MESH_TEST_HOTEND_TEMP  200.0  // (c)  Default nozzle temperature for the G26 Mesh Validation Tool.
#define MESH_TEST_BED_TEMP      60.0  // (c)  Default bed temperature for the G26 Mesh Validation Tool.

/** START MESH BED LEVELING **/
// Default mesh area is an area with an inset margin on the print area.
// Below are the macros that are used to define the borders for the mesh
// area, made available here for specialized needs.
#define MESH_MIN_X (X_MIN_POS + (MESH_INSET))
#define MESH_MAX_X (X_MAX_POS - (MESH_INSET))
#define MESH_MIN_Y (Y_MIN_POS + (MESH_INSET))
#define MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))

// After homing all axes ('G28' or 'G28 XYZ') rest Z at Z MIN POS
//#define MESH_G28_REST_ORIGIN
/** END MESH BED LEVELING **/

/** START UNIFIED BED LEVELING **/
// Default mesh area is an area with an inset margin on the print area.
// Below are the macros that are used to define the borders for the mesh area,
// made available here for specialized needs, ie dual extruder setup.
#define UBL_MESH_MIN_X (X_MIN_POS + (MESH_INSET))
#define UBL_MESH_MAX_X (X_MAX_POS - (MESH_INSET))
#define UBL_MESH_MIN_Y (Y_MIN_POS + (MESH_INSET))
#define UBL_MESH_MAX_Y (Y_MAX_POS - (MESH_INSET))

// Sophisticated users prefer no movement of nozzle
#define UBL_MESH_EDIT_MOVES_Z

// Save the currently active mesh in the current slot on M500
#define UBL_SAVE_ACTIVE_ON_M500

// When the nozzle is off the mesh, this value is used as the Z-Height correction value.
//#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5
/** END UNIFIED BED LEVELING **/

/** START MESH BED LEVELING or AUTO BED LEVELING LINEAR or AUTO BED LEVELING BILINEAR or UNIFIED BED LEVELING **/
// Set the number of grid points per dimension
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_Y 3
/** END MESH BED LEVELING or AUTO BED LEVELING LINEAR or AUTO BED LEVELING BILINEAR or UNIFIED BED LEVELING **/

/** START AUTO BED LEVELING LINEAR or AUTO BED LEVELING BILINEAR **/
// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION 15
#define RIGHT_PROBE_BED_POSITION 190
#define FRONT_PROBE_BED_POSITION 15
#define BACK_PROBE_BED_POSITION 190

// The Z probe minimum outer margin (to validate G29 parameters).
#define MIN_PROBE_EDGE 10

// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST

// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.
//#define ABL_BILINEAR_SUBDIVISION
// Number of subdivisions between probe points
#define BILINEAR_SUBDIVISIONS 3
/** END AUTO_BED_LEVELING_LINEAR or AUTO_BED_LEVELING_BILINEAR **/

/** START AUTO_BED_LEVELING_3POINT or UNIFIED BED LEVELING **/
// 3 arbitrary points to probe.
// A simple cross-product is used to estimate the plane of the bed.
#define PROBE_PT_1_X 15
#define PROBE_PT_1_Y 190
#define PROBE_PT_2_X 15
#define PROBE_PT_2_Y 15
#define PROBE_PT_3_X 220
#define PROBE_PT_3_Y 15
/** END AUTO_BED_LEVELING_3POINT or UNIFIED BED LEVELING **/

// Commands to execute at the end of G29 probing.
// Useful to retract or move the Z probe out of the way.
//#define Z_PROBE_END_SCRIPT "G1 Z10 F8000\nG1 X10 Y10\nG1 Z0.5"
/*****************************************************************************************/


/*****************************************************************************************
 ************************** Leveling Fade Height (MBL or ABL) ****************************
 *****************************************************************************************
 *                                                                                       *
 * Gradually reduce leveling correction until a set height is reached,                   *
 * at which point movement will be level to the machine's XY plane.                      *
 * The height can be set with M420 Z<height> for MBL or M320 Z<height> for ABL           *
 * ONLY FOR LEVELING BILINEAR OR MESH BED LEVELING                                       *
 *                                                                                       *
 *****************************************************************************************/
//#define ENABLE_LEVELING_FADE_HEIGHT
/*****************************************************************************************/


/*****************************************************************************************
 ******************************** Manual home positions **********************************
 *****************************************************************************************/
// The center of the bed is at (X=0, Y=0)
//#define BED_CENTER_AT_0_0

// Manually set the home position. Leave these undefined for automatic settings.
//#define MANUAL_X_HOME_POS 0
//#define MANUAL_Y_HOME_POS 0
//#define MANUAL_Z_HOME_POS 0
/*****************************************************************************************/


/*****************************************************************************************
 ********************************* Movement Settings *************************************
 *****************************************************************************************
 *                                                                                       *
 * Default Settings                                                                      *
 *                                                                                       *
 * These settings can be reset by M502                                                   *
 *                                                                                       *
 * Note that if EEPROM is enabled, saved values will override these.                     *
 *                                                                                       *
 *****************************************************************************************/


/*****************************************************************************************
 ******************************* Axis steps per unit *************************************
 *****************************************************************************************
 *                                                                                       *
 * Default Axis Steps Per Unit (steps/mm)                                                *
 * Override with M92                                                                     *
 *                                                                                       *
 *****************************************************************************************/
// Default steps per unit               X,  Y,    Z,  E0...(per extruder)
#define DEFAULT_AXIS_STEPS_PER_UNIT   {200, 200, 800, 838, 625, 625, 625}
/*****************************************************************************************/


/*****************************************************************************************
 ********************************** Axis feedrate ****************************************
 *****************************************************************************************/
//                                       X,   Y, Z,  E0...(per extruder). (mm/sec)
#define DEFAULT_MAX_FEEDRATE          {300, 300, 2, 100, 100, 100, 100}
// Feedrates for manual moves along        X,     Y,     Z,  E from panel
#define MANUAL_FEEDRATE               {50*60, 50*60, 4*60, 10*60}
// Minimum feedrate
#define DEFAULT_MIN_FEEDRATE          0.0
#define DEFAULT_MIN_TRAVEL_FEEDRATE   0.0
// Minimum planner junction speed. Sets the default minimum speed the planner plans for at the end
// of the buffer and all stops. This should not be much greater than zero and should only be changed
// if unwanted behavior is observed on a user's machine when running at very slow speeds.
#define MINIMUM_PLANNER_SPEED         0.05                      // (mm/sec)
/*****************************************************************************************/


/*****************************************************************************************
 ******************************** Axis acceleration **************************************
 *****************************************************************************************/
//  Maximum start speed for accelerated moves.    X,    Y,  Z,   E0...(per extruder)
#define DEFAULT_MAX_ACCELERATION              {3000, 3000, 100, 5000, 5000, 5000, 5000}
//  Maximum acceleration in mm/s^2 for retracts   E0... (per extruder)
#define DEFAULT_RETRACT_ACCELERATION          {5000, 5000, 5000, 5000}
//  X, Y, Z and E* maximum acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION          3000
//  X, Y, Z acceleration in mm/s^2 for travel (non printing) moves
#define DEFAULT_TRAVEL_ACCELERATION   3000
/*****************************************************************************************/


/*****************************************************************************************
 ************************************* Axis jerk *****************************************
 *****************************************************************************************
 *                                                                                       *
 * Default Jerk (mm/s)                                                                   *
 * Override with M205 X Y Z E                                                            *
 *                                                                                       *
 * "Jerk" specifies the minimum speed change that requires acceleration.                 *
 * When changing speed and direction, if the difference is less than the                 *
 * value set here, it may happen instantaneously.                                        *
 *                                                                                       *
 *****************************************************************************************/
#define DEFAULT_XJERK 10.0
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK  0.4
// E0... (mm/sec) per extruder
#define DEFAULT_EJERK                   {5.0, 5.0, 5.0, 5.0}
/*****************************************************************************************/


/*****************************************************************************************
 ************************************ Homing feedrate ************************************
 *****************************************************************************************/
// Homing speeds (mm/m)
#define HOMING_FEEDRATE_X (50*60)
#define HOMING_FEEDRATE_Y (50*60)
#define HOMING_FEEDRATE_Z (2*60)

// Homing hits each endstop, retracts by these distances, then does a slower bump.
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 2

// Re-Bump Speed Divisor (Divides the Homing Feedrate)
#define HOMING_BUMP_DIVISOR {5, 5, 2}
/*****************************************************************************************/


/*****************************************************************************************
 *********************************** Hotend offset ***************************************
 *****************************************************************************************
 *                                                                                       *
 * Offset of the hotends (uncomment if using more than one and relying on firmware       *
 * to position when changing).                                                           *
 * The offset has to be X=0, Y=0, Z=0 for the hotend 0 (default hotend).                 *
 * For the other hotends it is their distance from the hotend 0.                         *
 *                                                                                       *
 *****************************************************************************************/
#define HOTEND_OFFSET_X {0.0, 0.0, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the X axis
#define HOTEND_OFFSET_Y {0.0, 0.0, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Y axis
#define HOTEND_OFFSET_Z {0.0, 0.0, 0.0, 0.0} // (in mm) for each hotend, offset of the hotend on the Z axis
/*****************************************************************************************/


/*****************************************************************************************
 ******************************** Hysteresis Feature *************************************
 *****************************************************************************************
 *                                                                                       *
 * Hysteresis:                                                                           *
 * These are the extra distances that are performed when an axis changes direction       *
 * to compensate for any mechanical hysteresis your printer has.                         *
 * Set the parameters with M99 X<in mm> Y<in mm> Z<in mm>                                *
 *                                                                                       *
 *****************************************************************************************/
//#define HYSTERESIS_FEATURE

// Define values for hysteresis distance and correction.
#define HYSTERESIS_AXIS_MM    { 0, 0, 0 } // mm
#define HYSTERESIS_CORRECTION 0.0         // 0.0 = no correction; 1.0 = full correction
/*****************************************************************************************/

#endif /* _CONFIGURATION_CARTESIAN_H_ */

PINS (premetto di aver definito un pin dall'AUX come Servo0 per il BLTouch, spero correttamente perché non avevo mai modificato i pin prima..)

/**
 * MK4duo Firmware for 3D Printer, Laser and CNC
 *
 * Based on Marlin, Sprinter and grbl
 * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
 * Copyright (C) 2013 Alberto Cotronei @MagoKimbra
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */

/**
 * Configuration_Pins.h
 *
 * This configuration file contains all Pins.
 *
 */

#ifndef _CONFIGURATION_PINS_H_
#define _CONFIGURATION_PINS_H_

//=================================== BASIC ==================================

// X axis pins
#define X_STEP_PIN          ORIG_X_STEP_PIN
#define X_DIR_PIN           ORIG_X_DIR_PIN
#define X_ENABLE_PIN        ORIG_X_ENABLE_PIN
#define X_CS_PIN            ORIG_X_CS_PIN

// X2 axis pins
#if ENABLED(DUAL_X_CARRIAGE) || ENABLED(X_TWO_STEPPER_DRIVERS)
  #define X2_STEP_PIN       ORIG_E1_STEP_PIN
  #define X2_DIR_PIN        ORIG_E1_DIR_PIN
  #define X2_ENABLE_PIN     ORIG_E1_ENABLE_PIN
  #define X2_CS_PIN         ORIG_E1_CS_PIN
#endif

// Y axis pins
#define Y_STEP_PIN          20             //ORIG_Y_STEP_PIN
#define Y_DIR_PIN           19             //ORIG_Y_DIR_PIN
#define Y_ENABLE_PIN        21             //ORIG_Y_ENABLE_PIN
#define Y_CS_PIN            ORIG_Y_CS_PIN

// Y2 axis pins
#if ENABLED(Y_TWO_STEPPER_DRIVERS)
  #define Y2_STEP_PIN       ORIG_E1_STEP_PIN
  #define Y2_DIR_PIN        ORIG_E1_DIR_PIN
  #define Y2_ENABLE_PIN     ORIG_E1_ENABLE_PIN
  #define Y2_CS_PIN         ORIG_E1_CS_PIN
#endif

// Z axis pins
#define Z_STEP_PIN          ORIG_Z_STEP_PIN
#define Z_DIR_PIN           ORIG_Z_DIR_PIN
#define Z_ENABLE_PIN        ORIG_Z_ENABLE_PIN
#define Z_CS_PIN            ORIG_Z_CS_PIN

// Z2 axis pins
#if ENABLED(Z_TWO_STEPPER_DRIVERS)
  #define Z2_STEP_PIN       ORIG_E1_STEP_PIN
  #define Z2_DIR_PIN        ORIG_E1_DIR_PIN
  #define Z2_ENABLE_PIN     ORIG_E1_ENABLE_PIN
  #define Z2_CS_PIN         ORIG_E1_CS_PIN
#endif

// E axis pins
#if DRIVER_EXTRUDERS > 0
  #define E0_STEP_PIN       ORIG_E0_STEP_PIN
  #define E0_DIR_PIN        ORIG_E0_DIR_PIN
  #define E0_ENABLE_PIN     ORIG_E0_ENABLE_PIN
  #define E0_CS_PIN         ORIG_E0_CS_PIN
  #define SOL0_PIN          ORIG_SOL0_PIN
#endif

#if DRIVER_EXTRUDERS > 1
  #define E1_STEP_PIN       ORIG_E1_STEP_PIN
  #define E1_DIR_PIN        ORIG_E1_DIR_PIN
  #define E1_ENABLE_PIN     ORIG_E1_ENABLE_PIN
  #define E1_CS_PIN         ORIG_E1_CS_PIN
  #define SOL1_PIN          ORIG_SOL1_PIN
#endif

#if DRIVER_EXTRUDERS > 2
  #define E2_STEP_PIN       ORIG_E2_STEP_PIN
  #define E2_DIR_PIN        ORIG_E2_DIR_PIN
  #define E2_ENABLE_PIN     ORIG_E2_ENABLE_PIN
  #define E2_CS_PIN         ORIG_E2_CS_PIN
  #define SOL2_PIN          ORIG_SOL2_PIN
#endif

#if DRIVER_EXTRUDERS > 3
  #define E3_STEP_PIN       ORIG_E3_STEP_PIN
  #define E3_DIR_PIN        ORIG_E3_DIR_PIN
  #define E3_ENABLE_PIN     ORIG_E3_ENABLE_PIN
  #define E3_CS_PIN         ORIG_E3_CS_PIN
  #define SOL3_PIN          ORIG_SOL3_PIN
#endif

#if DRIVER_EXTRUDERS > 4
  #define E4_STEP_PIN       ORIG_E4_STEP_PIN
  #define E4_DIR_PIN        ORIG_E4_DIR_PIN
  #define E4_ENABLE_PIN     ORIG_E4_ENABLE_PIN
  #define E4_CS_PIN         ORIG_E4_CS_PIN
  #define SOL4_PIN          ORIG_SOL4_PIN
#endif

#if DRIVER_EXTRUDERS > 5
  #define E5_STEP_PIN       ORIG_E5_STEP_PIN
  #define E5_DIR_PIN        ORIG_E5_DIR_PIN
  #define E5_ENABLE_PIN     ORIG_E5_ENABLE_PIN
  #define E5_CS_PIN         ORIG_E5_CS_PIN
  #define SOL5_PIN          ORIG_SOL5_PIN
#endif

// ENDSTOP pins
#define X_MIN_PIN           ORIG_X_MIN_PIN
#define X_MAX_PIN           ORIG_X_MAX_PIN
#define Y_MIN_PIN           ORIG_Y_MIN_PIN
#define Y_MAX_PIN           ORIG_Y_MAX_PIN
#define Z_MIN_PIN           ORIG_Z_MIN_PIN
#define Z_MAX_PIN           ORIG_Z_MAX_PIN
#define X2_MIN_PIN          NoPin
#define Y2_MIN_PIN          NoPin
#define Z2_MIN_PIN          NoPin
#define Z3_MIN_PIN          NoPin
#define X2_MAX_PIN          NoPin
#define Y2_MAX_PIN          NoPin
#define Z2_MAX_PIN          NoPin
#define Z3_MAX_PIN          NoPin
#define Z_PROBE_PIN         ORIG_Z_PROBE_PIN

// HEATER pins
#define HEATER_0_PIN        ORIG_HEATER_0_PIN
#define HEATER_1_PIN        ORIG_HEATER_1_PIN
#define HEATER_2_PIN        ORIG_HEATER_2_PIN
#define HEATER_3_PIN        ORIG_HEATER_3_PIN
#define HEATER_BED_PIN      ORIG_HEATER_BED_PIN
#define HEATER_CHAMBER_PIN  ORIG_HEATER_CHAMBER_PIN
#define HEATER_COOLER_PIN   ORIG_COOLER_PIN

// TEMP pins
#define TEMP_0_PIN          ORIG_TEMP_0_PIN
#define TEMP_1_PIN          ORIG_TEMP_1_PIN
#define TEMP_2_PIN          ORIG_TEMP_2_PIN
#define TEMP_3_PIN          ORIG_TEMP_3_PIN
#define TEMP_BED_PIN        ORIG_TEMP_BED_PIN
#define TEMP_CHAMBER_PIN    ORIG_TEMP_CHAMBER_PIN
#define TEMP_COOLER_PIN     ORIG_TEMP_COOLER_PIN

// FAN pins
#define FAN0_PIN            ORIG_FAN0_PIN
#define FAN1_PIN            ORIG_FAN1_PIN
#define FAN2_PIN            ORIG_FAN2_PIN
#define FAN3_PIN            ORIG_FAN3_PIN
#define FAN4_PIN            ORIG_FAN4_PIN
#define FAN5_PIN            ORIG_FAN5_PIN

// PS ON pin
#define PS_ON_PIN           ORIG_PS_ON_PIN

// BEEPER pin
#define BEEPER_PIN          ORIG_BEEPER_PIN

//============================================================================

//================================= FEATURE ==================================

#if ENABLED(TACHOMETRIC)
  #define TACHO0_PIN NoPin
  #define TACHO1_PIN NoPin
  #define TACHO2_PIN NoPin
  #define TACHO3_PIN NoPin
  #define TACHO4_PIN NoPin
  #define TACHO5_PIN NoPin
#endif

#if ENABLED(MKR4)
  #define E0E1_CHOICE_PIN NoPin
  #define E0E2_CHOICE_PIN NoPin
  #define E1E3_CHOICE_PIN NoPin
#elif ENABLED(MKR6) || ENABLED(MKR12)
  #define EX1_CHOICE_PIN  NoPin
  #define EX2_CHOICE_PIN  NoPin
#endif

#if ENABLED(EXTRUDER_ENCODER_CONTROL)
  #define E0_ENC_PIN NoPin
  #define E1_ENC_PIN NoPin
  #define E2_ENC_PIN NoPin
  #define E3_ENC_PIN NoPin
  #define E4_ENC_PIN NoPin
  #define E5_ENC_PIN NoPin
#endif

#if ENABLED(LASER)
  #define LASER_PWR_PIN                   ORIG_LASER_PWR_PIN
  #define LASER_PWM_PIN                   ORIG_LASER_PWM_PIN
  #if ENABLED(LASER_PERIPHERALS)
    #define LASER_PERIPHERALS_PIN         NoPin
    #define LASER_PERIPHERALS_STATUS_PIN  NoPin
  #endif
#endif

#if ENABLED(CNCROUTER)
  #define CNCROUTER_PIN NoPin
#endif

#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  #define FIL_RUNOUT_0_PIN    NoPin
  #define FIL_RUNOUT_1_PIN    NoPin
  #define FIL_RUNOUT_2_PIN    NoPin
  #define FIL_RUNOUT_3_PIN    NoPin
  #define FIL_RUNOUT_4_PIN    NoPin
  #define FIL_RUNOUT_5_PIN    NoPin
  #define FIL_RUNOUT_DAV_PIN  NoPin
#endif

#if ENABLED(FILAMENT_SENSOR)
  #define FILWIDTH_PIN NoPin
#endif

#if ENABLED(FLOWMETER_SENSOR)
  #define FLOWMETER_PIN NoPin
#endif

#if ENABLED(POWER_CONSUMPTION)
  #define POWER_CONSUMPTION_PIN NoPin
#endif

#if ENABLED(PHOTOGRAPH)
  #define PHOTOGRAPH_PIN NoPin
#endif

#if ENABLED(CHDK)
  #define CHDK_PIN NoPin
#endif

#if ENABLED(CASE_LIGHT)
  #define CASE_LIGHT_PIN NoPin
#endif

#if ENABLED(DOOR_OPEN)
  #define DOOR_OPEN_PIN NoPin
#endif

#if ENABLED(POWER_CHECK)
  #define POWER_CHECK_PIN NoPin
#endif

#if ENABLED(Z_PROBE_SLED)
  #define SLED_PIN NoPin
#endif

#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
  #define RGB_LED_R_PIN NoPin
  #define RGB_LED_G_PIN NoPin
  #define RGB_LED_B_PIN NoPin
  #define RGB_LED_W_PIN NoPin
#endif

#if ENABLED(NEOPIXEL_LED)
  #define NEOPIXEL_PIN NoPin
#endif

#if ENABLED(DHT_SENSOR)
  #define DHT_DATA_PIN NoPin
#endif

#if HAVE_DRV(TMC2130) && ENABLED(SOFT_SPI_TMC2130)
  #define SOFT_MOSI_PIN 51
  #define SOFT_MISO_PIN 50
  #define SOFT_SCK_PIN  52
#endif

#define SERVO0_PIN 25
//============================================================================

#endif /* _CONFIGURATION_PINS_H_ */

Qualcuno saprebbe aiutarmi?

Grazie in anticipo a chi avrà la pazienza di leggere tutto!

Link al commento
Condividi su altri siti

Io ti posso dire quel poco che ho capito io (sempre che abbia capito bene il problema) e non so dirti come risolvere,

Il problema è che stai compilando per un processore che di norma non è previsto tra i processori di Arduino e quindi non ha gli elementi di base essenziali per compilare. In Arduino è possibile inserire altri processori ma io non no so dirti come devi agire per questo processore.

Dovresti cercare un pò in internert cercando arduino e avr e sam.

  • Like 1
Link al commento
Condividi su altri siti

Grazie per la risposta, Alep! Se ti riferisci a questo:

Il 16/12/2018 at 18:57, albemasci dice:

ATTENZIONE: la libreria U8glib dichiara di funzionare sulle architetture (avr, sam) e potrebbe non essere compatibile con la tua scheda che utilizza l'architettura (samd) In file included from sketch\src/inc/sanitycheck.h:120:0,

In realtà credo sia ignorabile. Dovrebbe essere solo riferito alla libreria del monitor (U8glib), che però garantiscono funzionare con questa libreria e con questa scheda.

Sono gli altri 3 i problemi che non riesco bene a comprendere o a correggere..

Se invece ho capito male io cosa intendevi, correggimi pure 😀

Link al commento
Condividi su altri siti

Mi riferisco a questa parte dell' errore

                 from C:\Users\Alberto\Desktop\Stampa 3D\Altro\Mascio's AM8\Firmware AM8 Minitronics\MK4duo\MK4duo.ino:318:

sketch\src/platform/common/servo.h:84:6: error: #error "Unsupported Platform!"

ma come ho accennato nel mio primo intervento non sono certo di quello che dico, non per nulla non sono intervenuto subito sperando nell'intervento di qualcuno più preparato di me in questo campo

  • Like 1
Link al commento
Condividi su altri siti

Ho fatto un test: ho provato a definire la stampante come una corexy, senza toccare il file config delle corexy. Teoricamente, se il problema fosse stato il processore, avrebbe dovuto darmi comunque errori e problemi; invece, nessun errore di compilazione! Ho anche provato a flashare, e funziona pure lo schermo! Quindi posso definitivamente ignorare il primo messaggio della libreria U8Glib.

La mia sensazione è che il nucleo del problema sia questo:

Il 16/12/2018 at 18:57, albemasci dice:

from C:\Users\Alberto\Desktop\Stampa 3D\Altro\Mascio's AM8\Firmware AM8 Minitronics\MK4duo\MK4duo.ino:318:  sketch\src/inc/../feature/probe/sanitycheck.h:77:6: error: #error "DEPENDENCY ERROR: A probe needs a pin! Use Z_MIN_PIN or Z_PROBE_PIN."  #error "DEPENDENCY ERROR: A probe needs a pin! Use Z_MIN_PIN or Z_PROBE_PIN." 

Il punto è che io credo di averlo definito, perché su Configuration_Pins ho questo:

// ENDSTOP pins
#define X_MIN_PIN           ORIG_X_MIN_PIN
#define X_MAX_PIN           ORIG_X_MAX_PIN
#define Y_MIN_PIN           ORIG_Y_MIN_PIN
#define Y_MAX_PIN           ORIG_Y_MAX_PIN
#define Z_MIN_PIN           ORIG_Z_MIN_PIN
#define Z_MAX_PIN           ORIG_Z_MAX_PIN
#define X2_MIN_PIN          NoPin
#define Y2_MIN_PIN          NoPin
#define Z2_MIN_PIN          NoPin
#define Z3_MIN_PIN          NoPin
#define X2_MAX_PIN          NoPin
#define Y2_MAX_PIN          NoPin
#define Z2_MAX_PIN          NoPin
#define Z3_MAX_PIN          NoPin
#define Z_PROBE_PIN         ORIG_Z_MIN_PIN
#define SERVO0_PIN          25

Ho provato anche con ORIG_Z_PROBE_PIN, con il numero del pin... niente.

ho provato a usare il configuratore online di marlin/kimbra con una scheda fittizia (il configuratore online non supporta la mia), specificando che ho un bltouch, poi ho studiato il Configuration_Pins per capire se sbagliavo qualcosa nel codice, ma sembra tutto ok...

Forse non è così che comunico al codice il pin della sonda!

Idee..?

Link al commento
Condividi su altri siti

Aggiornamento: FORSE ho risolto.

  • Ho sostituito il BLTouch con un sensore induttivo e relative modifiche al codice (sparito l'errore #error "Unsupported Platform!"). Forse la scheda non lo supporta!
  • Ho inserito di nuovo manualmente il pin dello Z_Probe, e stavolta ha funzionato (Sparito l'errore #error "DEPENDENCY ERROR: A probe needs a pin! Use Z_MIN_PIN or Z_PROBE_PIN.").
  • Ho sostituito un file incluso nel firmware fornito da reprapworld relativo alla mia scheda con quello originale di MK4Duo, ottenuto direttamente dal sito di marlinkimbra (sparito l'errore error: #endif without #if #endif /* _VECTOR_3_H_ */). A occhio, mi sembra che quest'ultimo non avesse semplicemente un #endif alla fine. Avevo anche provato ad aggiungere all'originale un #ifndef VECTOR_3_H_ ottenendo però altri errori.

Fatto l'upload sulla scheda, devo risolvere dei problemi agli stepper motor (si muovono correttamente ma emettono un forte ronzio), a quel punto avvierò una stampa e vedrò se tutto va bene: il file che ho sostituito con l'originale era relativo al livellamento automatico, quindi posso sapere se è tutto corretto solamente con una stampa (con livellamento) ben riuscita!

Segnalo anche ai possessori di Minitronics 2.0 che i pin sono totalmente sbagliati. Anche se scaricate la libreria, alle voci "Original_pincopallino_pin" non corrispondono i pin effettivi. Ho dovuto riscrivere singolarmente ogni pin per far funzionare tutto!

Link al commento
Condividi su altri siti

Partecipa alla conversazione

Puoi pubblicare ora e registrarti più tardi. Se hai un account, accedi ora per pubblicarlo con il tuo account.

Ospite
Rispondi a questa discussione...

×   Hai incollato il contenuto con la formattazione.   Rimuovere la formattazione

  Sono consentiti solo 75 emoticon max.

×   Il tuo collegamento è stato incorporato automaticamente.   Mostra come un collegamento

×   Il tuo contenuto precedente è stato ripristinato.   Pulisci editor

×   Non puoi incollare le immagini direttamente. Carica o inserisci immagini dall'URL.

 Condividi


×
×
  • Crea Nuovo...