bltouch on rumba32

I followed this documentation and I'm getting this error:

src\Configuration.cpp:27:62: error: expected primary-expression before ';' token
   27 | #define CONFIG_VARIABLE_EQ(tp, name, values) tp name = values;
                                                                                                               |^
src\Configuration.h:429:1: note: in expansion of macro 'CONFIG_VARIABLE_EQ'
  429 | CONFIG_VARIABLE_EQ(EndstopDriver, *ZProbe, ZPROBE_ADDRESS)
      | ^~~~~~~~~~~~~~~~~~
*** [.pio\build\RUMBA32\src\Configuration.cpp.o] Error 1


Comments

  • /*
        This file is part of Repetier-Firmware.

        Repetier-Firmware 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.

        Repetier-Firmware 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 Repetier-Firmware.  If not, see <http://www.gnu.org/licenses/>.

    */

    #pragma once

    /**************** READ FIRST ************************

       This configuration file was created with the configuration tool. For that
       reason, it does not contain the same informations as the original Configuration.h file.
       It misses the comments and unused parts. Open this file file in the config tool
       to see and change the data. You can also upload it to newer/older versions. The system
       will silently add new options, so compilation continues to work.

       This file is optimized for version 1.0.0dev

       If you are in doubt which named functions use which pins on your board, please check the
       pins.h for the used name->pin assignments and your board documentation to verify it is
       as you expect.

    */

    // The following variables are required early to decide on the right modules.
    #define NUM_TOOLS 2
    #define NUM_EXTRUDER 2
    #define NUM_SERVOS 1                  // Number of serves available
    #define MOTHERBOARD MOTHERBOARD_RUMBA32 // 405
    #define EEPROM_MODE 3
    #define RFSERIAL Serial
    //#define EXTERNALSERIAL  use Arduino serial library instead of build in. Requires more RAM, has only 63 byte input buffer.
    // Uncomment the following line if you are using Arduino compatible firmware made for Arduino version earlier than 1.0
    // If it is incompatible you will get compiler errors about write functions not being compatible!
    //#define COMPAT_PRE1
    #define BLUETOOTH_SERIAL -1
    #define BLUETOOTH_BAUD 115200
    #define WAITING_IDENTIFIER "wait"
    #define JSON_OUTPUT 1
    #define FEATURE_WATCHDOG 0
    #define FEATURE_RETRACTION 0
    #define NUM_AXES 4 // X,Y,Z and E for extruder A,B,C would be 5,6,7
    // #define STEPPER_FREQUENCY 153000     // Maximum stepper frequency.
    #define STEPPER_FREQUENCY 153000     // Maximum stepper frequency.
    #define PREPARE_FREQUENCY 1000       // Update frequency for new blocks. Must be higher than PREPARE_FREQUENCY.
    #define BLOCK_FREQUENCY 500          // Number of blocks with constant stepper rate per second.
    #define VELOCITY_PROFILE 2           // 0 = linear, 1 = cubic, 2 = quintic velocity shape
    #define Z_SPEED 5                   // Z positioning speed
    #define XY_SPEED 150                 // XY positioning speed for normal operations
    #define E_SPEED 2                    // Extrusion speed
    #define G0_FEEDRATE 0                // Speed for G0 moves. Independent from set F value! Set 0 to use F value.
    #define MAX_ROOM_TEMPERATURE 25      // No heating below this temperature!
    #define TEMPERATURE_CONTROL_RANGE 20 // Start with controlling if temperature is +/- this value to target temperature
    #define HOST_RESCUE 1                // Enable host rescue help system
    //#define DEBUG_RESCUE                 // Uncomment to add power loss entry in debug menu while printing
    #define POWERLOSS_LEVEL 2       // How much time do we have on powerloss, 0 = no move, 1 = short just raise Z, 2 = long full park move
    #define POWERLOSS_UP 5          // How much to move up if mode 1 is active
    #define Z_PROBE_TYPE 3          // 0 = no z probe, 1 = default z probe, 2 = Nozzle as probe
    #define Z_PROBE_BORDER 2        // Safety border to ensure position is allowed
    #define Z_PROBE_TEMPERATURE 170 // Temperature for type 2

    // 0 = Cartesian, 1 = CoreXYZ, 2 = delta, 3 = Dual X-Axis
    #define PRINTER_TYPE 0
    // steps to include as babysteps per 1/BLOCK_FREQUENCY seconds. Must be lower than STEPPER_FREQUENCY/BLOCK_FREQUENCY and be low enough to not lose steps.
    #define BABYSTEPS_PER_BLOCK \
        { 10, 10, 10 }
    // If all axis end stops are hardware based we can skip the time consuming tests each step
    #define NO_SOFTWARE_AXIS_ENDSTOPS
    // Normally only a delta has motor end stops required. Normally you trigger using axis endstops.
    #define NO_MOTOR_ENDSTOPS

    #define FEATURE_CONTROLLER CONTROLLER_REPRAPDISCOUNT_GLCD //  CONTROLLER_FELIX_DUE
    // Use more memory to speedup display updates
    #define DISPLAY_FULL_BUFFER 1
    // Direction 1 or -1
    // #define ENCODER_DIRECTION -1
    // Encoder speed 0 = fastest, 1 or 2 = slowest - set so 1 click is one menu move
    // Default is 2 if not set by controller. Use only to fix wrong setting
    #define ENCODER_SPEED 1

    // Dynamically increase the speed at which we step through the menus/change values.
    // Set ENCODER_MAX_REPEAT_STEPS to 1 to disable this. EEPROM/Runtime configurable. (Set to 0 to compile out entirely for extra RAM)
    #define ENCODER_MAX_REPEAT_STEPS 5            // Max. extra steps we can gain.
    #define ENCODER_MAX_REPEAT_TIME_MS 40         // Max. time we have before our extra steps reset.
    #define ENCODER_MIN_REPEAT_TIME_MS 15         // At this repeat rate we accumulate to the max step speed.
    #define ENCODER_APPLY_REPEAT_STEPS_IN_MENUS 1 // Set to 0 to only affect changing config values.

    // Default materials in temperature menus. First value is extruder temp, then bed and chamber temperature. 0 = do not show.
    #define DEFAULT_MATERIALS \
        DEFAULT_MATERIAL(Com::tMatPLA, 215, 60, 0) \
        DEFAULT_MATERIAL(Com::tMatPET, 230, 55, 0) \
        DEFAULT_MATERIAL(Com::tMatASA, 260, 105, 0) \
        DEFAULT_MATERIAL(Com::tMatPC, 275, 110, 0) \
        DEFAULT_MATERIAL(Com::tMatABS, 255, 100, 0) \
        DEFAULT_MATERIAL(Com::tMatHIPS, 220, 100, 0) \
        DEFAULT_MATERIAL(Com::tMatPP, 254, 100, 0) \
        DEFAULT_MATERIAL(Com::tMatFLEX, 240, 50, 0)

    /* Ratios for core xyz. First index denotes motor and second axis.
    For each motor you can set the ratio of x,y,z position that adds
    to the position. 0 = no contribution. */
    // X motor = x + y
    #define COREXYZ_X_X 1
    #define COREXYZ_X_Y 1
    #define COREXYZ_X_Z 0
    // Y motor = x - y
    #define COREXYZ_Y_X 1
    #define COREXYZ_Y_Y -1
    #define COREXYZ_Y_Z 0
    // Z motor = z
    #define COREXYZ_Z_X 0
    #define COREXYZ_Z_Y 0
    #define COREXYZ_Z_Z 1

    // Special geometry definition if printer type is delta
    /*  =========== Parameter essential for delta calibration ===================

                C, Y-Axis
                |                        |___| Carriage horizontal offset
                |                        |   \------------------------------------------
                |_________ X-axis        |    \                                        |
               / \                       |     \  DELTA_DIAGONAL (length)    Each move this Rod Height
              /   \                             \                                 is calculated
             /     \                             \    Carriage is at printer center!   |
             A      B                             \_____/--------------------------------
                                                  |--| End effector horizontal offset (recommend set it to 0)
                                             |----| DELTA_HORIZONTAL_RADIUS (Horizontal rod pivot to pivot measure)

        Column angles are measured from X-axis counterclockwise
        "Standard" positions: alpha_A = 210, alpha_B = 330, alpha_C = 90
    */
    #define DELTA_DIAGONAL 350.0f
    #define DELTA_HORIZONTAL_RADIUS 210.0f
    #define DELTA_PRINT_RADIUS 200.0f
    #define DELTA_ANGLE_A 210.0f
    #define DELTA_ANGLE_B 330.0f
    #define DELTA_ANGLE_C 90.0f
    #define DELTA_CORRECTION_A 0.0f
    #define DELTA_CORRECTION_B 0.0f
    #define DELTA_CORRECTION_C 0.0f
    #define DELTA_RADIUS_CORRECTION_A 0.0f
    #define DELTA_RADIUS_CORRECTION_B 0.0f
    #define DELTA_RADIUS_CORRECTION_C 0.0f
    #define DELTA_HOME_OFFSET_A 0.0f
    #define DELTA_HOME_OFFSET_B 0.0f
    #define DELTA_HOME_OFFSET_C 0.0f

    #define DISABLE_X 0
    #define DISABLE_Y 0
    #define DISABLE_Z 0

    #define FEATURE_AXISCOMP 1
    #define AXISCOMP_TANXY 0
    #define AXISCOMP_TANYZ 0
    #define AXISCOMP_TANXZ 0

    // Next 7 lines are required to make the following work, do not change!
    #include "boards/pins.h"
    #undef IO_TARGET
    #define IO_TARGET 4
    #undef CONFIG_EXTERN
    #define CONFIG_EXTERN extern
    #include "drivers/drivers.h"
    #include "io/redefine.h"

    /** Axes are homed in order of priority (0..10) if homing direction is not 0. */
    #define X_HOME_PRIORITY 2
    #define Y_HOME_PRIORITY 1
    #define Z_HOME_PRIORITY 0

    // All fans in this list list become controllable with M106/M107
    // by selecteing the fan number with P0..P<NUM_FANS-1>
    #define NUM_FANS 1
    #define FAN_LIST \
        { &Fan1PWM }

    #define NUM_HEATED_BEDS 1
    #define HEATED_BED_LIST \
        { &HeatedBed1 }

    #define NUM_HEATED_CHAMBERS 0
    #define HEATED_CHAMBER_LIST \
        { }

    #define SERVO_LIST \
        { &Servo1 }
    #define TOOLS \
        { &ToolExtruder1, &ToolExtruder2 }

    // Heaters enumerate all heaters, so we can loop over them
    // or call commands on a specific heater number.
    // Suggested order: extruder heaters, heated beds, heated chambers, additional heaters
    #define NUM_HEATERS 3
    #define HEATERS \
        { &HeaterExtruder1, &HeaterExtruder2, &HeatedBed1 }

    // Array to call motor related commands like microstepping/current if supported.
    // Id's start at 0 and depend on position in this array.
    #define NUM_MOTORS 5
    #define MOTORS \
        { &XMotor, &YMotor, &ZMotor }
    #define MOTOR_NAMES \
        { PSTR("X"), PSTR("Y"), PSTR("Z") }

    // Some common settings for Trinamic driver settings
    /**
     Chopper timing is an array with
     {toff, hend, hstrt}
     See TMC datasheets for more details. There are some predefined values to get you started:
     CHOPPER_TIMING_DEFAULT_12V = { 3, -1, 1 }
     CHOPPER_TIMING_DEFAULT_19V = { 4, 1, 1 }
     CHOPPER_TIMING_DEFAULT_24V = { 4, 2, 1 }
     CHOPPER_TIMING_DEFAULT_36V = { 5, 2, 4 }
     CHOPPER_TIMING_PRUSAMK3_24V = { 3, -2, 6 }

    */
    #define TMC_CHOPPER_TIMING CHOPPER_TIMING_DEFAULT_12V
    // true = interpolate to 256 microsteps for smoother motion
    #define TMC_INTERPOLATE true
    // Current used when motor stands still
    #define TMC_HOLD_MULTIPLIER 0.5
    // Reduce current on over temperature warnings by x milli ampere, 0 = disable
    #define TMC_CURRENT_STEP_DOWN 50
    // Define which data should be stored to eeprom
    #define STORE_MOTOR_MICROSTEPPING 1
    #define STORE_MOTOR_CURRENT 1
    #define STORE_MOTOR_HYBRID_TRESHOLD 1
    #define STORE_MOTOR_STEALTH 1
    #define STORE_MOTOR_STALL_SENSITIVITY 1

    #define X_HOME_DIR -1
    #define Y_HOME_DIR -1
    #define Z_HOME_DIR 1
    #define X_MAX_LENGTH 200
    #define Y_MAX_LENGTH 200
    #define Z_MAX_LENGTH 235
    #define X_MIN_POS 0
    #define Y_MIN_POS 0
    #define Z_MIN_POS 0
    #define BED_X_MIN X_MIN_POS
    #define BED_X_MAX (X_MIN_POS + X_MAX_LENGTH)
    #define BED_Y_MIN Y_MIN_POS
    #define BED_Y_MAX (Y_MIN_POS + Y_MAX_LENGTH)

    // Park position used when pausing from firmware side
    #if PRINTER_TYPE == 2
    #define PARK_POSITION_X (0)
    #define PARK_POSITION_Y (70)
    #define PARK_POSITION_X (X_MIN_POS)
    #define PARK_POSITION_Y (Y_MIN_POS + Y_MAX_LENGTH)
    #define PARK_POSITION_Z_RAISE 10

    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_X 1100
    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1100
    #define MAX_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_X 1100
    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Y 1100
    #define MAX_TRAVEL_ACCELERATION_UNITS_PER_SQ_SECOND_Z 100
    #define XAXIS_STEPS_PER_MM 64.125
    #define YAXIS_STEPS_PER_MM 64.125
    #define ZAXIS_STEPS_PER_MM 1600

    // ################## EDIT THESE SETTINGS MANUALLY ################
    // ################ END MANUAL SETTINGS ##########################

    #undef X_MIN_PIN
    #define X_MIN_PIN ORIG_X_MIN_PIN
    #undef Y_MIN_PIN
    #define Y_MIN_PIN ORIG_Y_MIN_PIN
    #undef Z_MAX_PIN
    #define Z_MAX_PIN ORIG_Z_MAX_PIN
    #undef X_MAX_PIN
    #define X_MAX_PIN -1
    #undef Y_MAX_PIN
    #define Y_MAX_PIN -1
    #undef Z_MIN_PIN
    #define Z_MIN_PIN ORIG_Z_MIN_PIN

    #define KILL_IF_SENSOR_DEFECT 0
    #define RETRACT_ON_PAUSE 2
    #define PAUSE_START_COMMANDS ""
    #define PAUSE_END_COMMANDS ""

    #define AUTORETRACT_ENABLED 0
    #define RETRACTION_LENGTH 3
    #define RETRACTION_LONG_LENGTH 13
    #define RETRACTION_SPEED 40
    #define RETRACTION_Z_LIFT 0
    #define RETRACTION_UNDO_EXTRA_LENGTH 0
    #define RETRACTION_UNDO_EXTRA_LONG_LENGTH 0
    #define RETRACTION_UNDO_SPEED 25
    #define FILAMENTCHANGE_X_POS 5
    #define FILAMENTCHANGE_Y_POS 5
    #define FILAMENTCHANGE_Z_ADD 2
    #define FILAMENTCHANGE_REHOME 0
    #define FILAMENTCHANGE_SHORTRETRACT 2.5
    #define FILAMENTCHANGE_LONGRETRACT 50
    #define JAM_METHOD 1
    #define JAM_ACTION 0

    #define RETRACT_DURING_HEATUP true
    #define PID_CONTROL_RANGE 20
    #define EXTRUDE_MAXLENGTH 160

    // ############# Heated bed configuration ########################

    #define SKIP_M190_IF_WITHIN 5
    #define MIN_EXTRUDER_TEMP 150
    #define MILLISECONDS_PREHEAT_TIME 30000

    // ################ Endstop configuration #####################

    #define DOOR_PIN -1
    #define DOOR_PULLUP 1
    #define DOOR_INVERTING 1
    #define ENDSTOP_X_BACK_MOVE 5
    #define ENDSTOP_Y_BACK_MOVE 5
    #define ENDSTOP_Z_BACK_MOVE 25
    #define ENDSTOP_X_RETEST_REDUCTION_FACTOR 5
    #define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 5
    #define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3
    #define ENDSTOP_X_BACK_ON_HOME 0
    #define ENDSTOP_Y_BACK_ON_HOME 0
    #define ENDSTOP_Z_BACK_ON_HOME 0
    #define ALWAYS_CHECK_ENDSTOPS 1
    #define MOVE_X_WHEN_HOMED 0
    #define MOVE_Y_WHEN_HOMED 0
    #define MOVE_Z_WHEN_HOMED 0

    // ################# XYZ movements ###################

    #define PREVENT_Z_DISABLE_ON_STEPPER_TIMEOUT 1

    // ##########################################################################################
    // ##                           Movement settings                                          ##
    // ##########################################################################################

    #define FEATURE_BABYSTEPPING 1
    #define BABYSTEP_MULTIPLICATOR 64

    // Delta settings
    #define DELTA_HOME_ON_POWER 0

    #define STEPPER_INACTIVE_TIME 360L
    #define MAX_INACTIVE_TIME 1200L
    #define MAX_FEEDRATE_X 250
    #define MAX_FEEDRATE_Y 250
    #define MAX_FEEDRATE_Z 10
    #define HOMING_FEEDRATE_X 200
    #define HOMING_FEEDRATE_Y 200
    #define HOMING_FEEDRATE_Z 4
    // Raise z before homing (1)
    #define ZHOME_PRE_RAISE 0
    // How much mm should z raise before homing
    #define ZHOME_PRE_RAISE_DISTANCE 2
    #define ZHOME_MIN_TEMPERATURE 0
    #define ZHOME_HEAT_ALL 0
    // Height in mm after homing.
    #define ZHOME_HEIGHT 230
    // Home Z at a fixed xy position (1)
    #define FIXED_Z_HOME_POSITION 0
    #define ZHOME_X_POS 100
    #define ZHOME_Y_POS 50
    // Raise extruders before switching tools. Used to prevent touching objects while switching.
    #define RAISE_Z_ON_TOOLCHANGE 2

    #define ENABLE_BACKLASH_COMPENSATION 0
    #define X_BACKLASH 0
    #define Y_BACKLASH 0
    #define Z_BACKLASH 0
    #define MAX_JERK 25
    #define MAX_ZJERK 0.3
    #define PRINTLINE_CACHE_SIZE 32
    #define MOVE_CACHE_LOW 10
    #define EXTRUDER_SWITCH_XY_SPEED 100
    #define FEATURE_DITTO_PRINTING 0

    // ################# Misc. settings ##################

    #define BAUDRATE 115200
    #define ENABLE_POWER_ON_STARTUP 1
    #define POWER_INVERTING 0
    #define KILL_METHOD 1
    #define ACK_WITH_LINENUMBER 1
    #define KEEP_ALIVE_INTERVAL 2000
    #define ECHO_ON_EXECUTE 1
    #undef PS_ON_PIN
    #define PS_ON_PIN -1

    // #################### Z-Probing #####################

    #define Z_PROBE_COATING 0
    #define Z_PROBE_Z_OFFSET_MODE 1
    #define UI_BED_COATING 1
    #define EXTRUDER_IS_Z_PROBE 0
    #define Z_PROBE_DISABLE_HEATERS 1
    #define Z_PROBE_BED_DISTANCE 7
    #define Z_PROBE_X_OFFSET 0
    #define Z_PROBE_Y_OFFSET 0
    #define Z_PROBE_SPEED 2
    #define Z_PROBE_SWITCHING_DISTANCE 1
    // How often should we test a position 1 .. x. Averages result over all tests.
    #define Z_PROBE_REPETITIONS 1
    // 0 = use average, 1 = use middle value after ordering z
    #define Z_PROBE_USE_MEDIAN 1
    // Nozzle distance to bed when z probe triggers
    #define Z_PROBE_HEIGHT 6.05
    // Delay in ms before we go down again. For BLTouch so signal can disable
    #define Z_PROBE_DELAY 0
    #define Z_PROBE_START_SCRIPT ""
    #define Z_PROBE_FINISHED_SCRIPT ""
    #define Z_PROBE_RUN_AFTER_EVERY_PROBE ""
    // Define ZProbe by referencing a endstop defined
    CONFIG_VARIABLE_EQ(EndstopDriver, *ZProbe, ZPROBE_ADDRESS)
    #define Z_PROBE_REQUIRES_HEATING 1
    #define Z_PROBE_MIN_TEMPERATURE 150
    #define Z_PROBE_PAUSE_HEATERS 0         // Pause all heaters when probing to reduce EMI artifacts
    #define Z_PROBE_PAUSE_BED_REHEAT_TEMP 5 // Stop and reheat the bed if we leave the target temp by this much.

    // How to correct rotated beds
    // 0 = Software side by rotating coordinates
    // 1 = Move bed physically using 2 motors
    #define LEVELING_CORRECTOR 0
    // Bed fixture coordinates for motor leveling
    #define LC_P1_X 55
    #define LC_P1_Y 130
    #define LC_P2_X 137
    #define LC_P2_Y 45
    #define LC_P3_X 137
    #define LC_P3_Y 210
    #define LC_P2_MOTOR AL1Motor
    #define LC_P3_MOTOR AL2Motor
    #define LC_STEPS_PER_MM 3382
    #define LC_Z_SPEED 0.2
    // > 0 will move bed down and wait for removal (heater removed) and will pause another LC_WAIT_BED_REMOVE seconds
    #define LC_WAIT_BED_REMOVE 2
    // Uncomment to limit correction per autoleveling iteration. Value is the max. correction in mm
    // #define LIMIT_MOTORIZED_CORRECTION 0.5

    // Leveling method
    // 0 = none, 3 = 3 points, 1 = grid, 2 = 4 point symmetric
    #define LEVELING_METHOD 2
    #define L_P1_X 60
    #define L_P1_Y 130
    #define L_P2_X 137
    #define L_P2_Y 45
    #define L_P3_X 137
    #define L_P3_Y 210
    #define MAX_GRID_SIZE 5                   // Maximum grid size allocation in memory, imported grid can be smaller
    #define ENABLE_BUMP_CORRECTION 1          // CPU intensive, so only activate if required
    #define BUMP_CORRECTION_START_DEGRADE 0.5 // Until this height we correct 100%
    #define BUMP_CORRECTION_END_HEIGHT 2      // From this height on we do no correction
    #define BUMP_LIMIT_TO 0                   // Maximum allowed correction up/down, <= 0 off.

    #ifndef SDSUPPORT // Some boards have sd support on board. These define the values already in pins.h
    #define SDSUPPORT 1
    #undef SDCARDDETECT
    #define SDCARDDETECT ORIG_SDCARDDETECT
    #define SDCARDDETECTINVERTED 0
    #define SD_EXTENDED_DIR 1 /** Show extended directory including file length. Don't use this with Pronterface! */
    #define SD_RUN_ON_STOP ""
    #define SD_STOP_HEATER_AND_MOTORS_ON_STOP 1
    #define ARC_SUPPORT 0
    #define FEATURE_MEMORY_POSITION 1
    #define FEATURE_CHECKSUM_FORCED 0
    #define UI_PRINTER_NAME "Foundry Printer"
    #define UI_PRINTER_COMPANY "3dward Additives"
    #define UI_PAGES_DURATION 4000
    #define UI_SPEEDDEPENDENT_POSITIONING 0
    #define UI_DISABLE_AUTO_PAGESWITCH 1
    #define UI_AUTORETURN_TO_MENU_AFTER 30000
    #define FEATURE_UI_KEYS 0
    #define UI_ENCODER_SPEED 2
    #define UI_REVERSE_ENCODER 0
    #define UI_KEY_BOUNCETIME 10
    #define UI_KEY_FIRST_REPEAT 500
    #define UI_KEY_REDUCE_REPEAT 50
    #define UI_KEY_MIN_REPEAT 50
    #define CASE_LIGHTS_PIN 25
    #define CASE_LIGHT_DEFAULT_ON 1
    #define UI_START_SCREEN_DELAY 2000

    //#define CUSTOM_EVENTS



    /*

    This file defines io solutions used. This is the lowest level and is the base
    for all higher level functions using io operations. At several places we need
    subsets of these list of operations. To make configuration easy and easy to
    understand, we use a technique called "x macros". This requires that only
    predefined macro names for IO are used here. Do NOT add anything else here
    or compilation/functionality will break.

    Rules:
    1. Each definition will create a class that is named like the first parameter.
    This class is later used as input to templates building higher functions. By
    convention the names should start with IO followed by something that helps you
    identify the function.
    2. Do not use a semicolon at the end. Macro definition gets different meanings
    and will add the semicolon if required.

    */

    /* Define motor pins here. Each motor needs a setp, dir and enable pin. */

    ENDSTOP_NONE(endstopNone)
    // For use when no output is wanted, but possible
    IO_OUTPUT_FAKE(fakeOut)

    // X Motor

    IO_OUTPUT(IOX1Step, ORIG_X_STEP_PIN)
    IO_OUTPUT_INVERTED(IOX1Dir, ORIG_X_DIR_PIN)
    IO_OUTPUT_INVERTED(IOX1Enable, ORIG_X_ENABLE_PIN)

    // Y Motor

    IO_OUTPUT(IOY1Step, ORIG_Y_STEP_PIN)
    IO_OUTPUT(IOY1Dir, ORIG_Y_DIR_PIN)
    IO_OUTPUT_INVERTED(IOY1Enable, ORIG_Y_ENABLE_PIN)

    // Z Motor

    IO_OUTPUT(IOZ1Step, ORIG_Z_STEP_PIN)
    IO_OUTPUT_INVERTED(IOZ1Dir, ORIG_Z_DIR_PIN)
    IO_OUTPUT_INVERTED(IOZ1Enable, ORIG_Z_ENABLE_PIN)

    // E0 Motor

    IO_OUTPUT(IOE1Step, ORIG_E0_STEP_PIN)
    IO_OUTPUT_INVERTED(IOE1Dir, ORIG_E0_DIR_PIN)
    IO_OUTPUT_INVERTED(IOE1Enable, ORIG_E0_ENABLE_PIN)

    // E1 Motor

    IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)
    IO_OUTPUT_INVERTED(IOE2Dir, ORIG_E1_DIR_PIN)
    IO_OUTPUT_INVERTED(IOE2Enable, ORIG_E1_ENABLE_PIN)

    // Autolevel Motor 1

    IO_OUTPUT(IOAL1Step, 51)
    IO_OUTPUT(IOAL1Dir, 53)
    IO_OUTPUT_INVERTED(IOAL1Enable, 49)

    // Autolevel Motor 1

    IO_OUTPUT(IOAL2Step, 39)
    IO_OUTPUT(IOAL2Dir, 13)
    IO_OUTPUT_INVERTED(IOAL2Enable, 40)

    // Servo output

    //IO_OUTPUT(Servo1Pin, 5)

    // Servo for z-probe
    IO_OUTPUT(Servo1Pin, 4)
    SERVO_ANALOG(ZProbeServo, 0, Servo1Pin, 500, 2500, 1473)
    // Set to nullptr for no zprobe or &endstopName for a switch
    #undef ZPROBE_ADDRESS
    #define ZPROBE_ADDRESS &IOEndstopZMin

    // Define your endstops inputs

    //IO_INPUT(IOEndstopXMin, ORIG_X_MIN_PIN)
    IO_INPUT_INVERTED_PULLUP(IOEndstopXMin, ORIG_X_MIN_PIN)
    IO_INPUT_INVERTED_PULLUP(IOEndstopYMin, ORIG_Y_MIN_PIN)
    // IO_INPUT_INVERTED(IOEndstopXMin, ORIG_X_MIN_PIN)
    //IO_INPUT(IOEndstopYMin, ORIG_Y_MIN_PIN)
    IO_INPUT_INVERTED_PULLUP(IOEndstopZMax, ORIG_Z_MAX_PIN)
    IO_INPUT_PULLUP(IOEndstopZMin, ORIG_Z_MIN_PIN)
    //IO_INPUT_PULLUP(IOEndstopZProbe, ORIG_Z_MIN_PIN)

    IO_INPUT_DUMMY(IOJam1, 35)
    IO_INPUT_DUMMY(IOJam2, 33)

    // Controller input pins

    #if defined(UI_ENCODER_CLICK) && UI_ENCODER_CLICK >= 0
    IO_INPUT_INVERTED_PULLUP(ControllerClick, UI_ENCODER_CLICK)
    IO_INPUT_DUMMY(ControllerClick, false)
    #if defined(UI_ENCODER_A) && UI_ENCODER_A >= 0
    IO_INPUT_INVERTED_PULLUP(ControllerEncA, UI_ENCODER_A)
    IO_INPUT_DUMMY(ControllerEncA, false)
    #if defined(UI_ENCODER_B) && UI_ENCODER_B >= 0
    IO_INPUT_INVERTED_PULLUP(ControllerEncB, UI_ENCODER_B)
    IO_INPUT_DUMMY(ControllerEncB, false)
    #if defined(UI_BACK_PIN) && UI_BACK_PIN >= 0
    IO_INPUT_PULLUP(ControllerBack, UI_BACK_PIN)
    IO_INPUT_DUMMY(ControllerBack, false)
    #if defined(UI_RESET_PIN) && UI_RESET_PIN >= 0
    IO_INPUT_PULLUP(ControllerReset, UI_RESET_PIN)
    IO_INPUT_DUMMY(ControllerReset, false)

    // Define our endstops solutions
    // You need to define all min and max endstops for all
    // axes except E even if you have none!

    ENDSTOP_SWITCH_HW(endstopXMin, IOEndstopXMin, X_AXIS, false)
    ENDSTOP_SWITCH_HW(endstopYMin, IOEndstopYMin, Y_AXIS, false)
    ENDSTOP_SWITCH_HW(endstopZMax, IOEndstopZMax, Z_AXIS, true)
    ENDSTOP_NONE(endstopXMax)
    ENDSTOP_NONE(endstopYMax)
    //ENDSTOP_NONE(endstopZMin)
    ENDSTOP_SWITCH_HW(endstopZMin, IOEndstopZMin, Z_AXIS, true)

    // Define fans

    IO_OUTPUT(IOFan1, ORIG_FAN_PIN)
    IO_PWM_SOFTWARE(Fan1NoKSPWM, IOFan1, 0)
    // IO_PWM_HARDWARE(Fan1PWM, 37,5000)
    // IO_PDM_SOFTWARE(Fan1NoKSPWM, IOFan1) // alternative to PWM signals
    IO_PWM_KICKSTART(Fan1PWM, Fan1NoKSPWM, 20, 85)
    // For debugging - reports new values and then calls real pwm
    // IO_PWM_REPORT(Fan1Report, Fan1PWM)
    // Define temperature sensors

    // Typically they require an analog input (12 bit) so define
    // them first.

    IO_ANALOG_INPUT(IOAnalogBed1, TEMP_1_PIN, 5)
    IO_ANALOG_INPUT(IOAnalogExt1, TEMP_0_PIN, 5)
    IO_ANALOG_INPUT(IOAnalogExt2, TEMP_3_PIN, 5)

    // Need a conversion table for epcos NTC
    IO_TEMP_TABLE_NTC(TempTableatc, ATC_104GT)
    IO_TEMP_TABLE_NTC(TempTablePT100, PT100_5V)
    // Now create the temperature inputs

    IO_TEMPERATURE_TABLE(TempBed1, IOAnalogBed1, TempTableatc)
    IO_TEMPERATURE_TABLE(TempExt1, IOAnalogExt1, TempTablePT100)
    IO_TEMPERATURE_TABLE(TempExt2, IOAnalogExt2, TempTableatc)

    // Use PWM outputs to heat. If using hardware PWM make sure
    // that the selected pin can be used as hardware pwm otherwise
    // select a software pwm model whcih works on all pins.

    #if MOTHERBOARD == 405
    IO_PWM_HARDWARE(PWMExtruder1, HEATER_0_PIN, 1000)
    IO_PWM_HARDWARE(PWMExtruder2, HEATER_2_PIN, 1000)
    IO_PWM_HARDWARE(PWMBed1, HEATER_1_PIN, 1000)
    IO_OUTPUT(IOExtr1, HEATER_0_PIN)
    IO_OUTPUT(IOExtr2, HEATER_2_PIN)
    IO_OUTPUT(IOBed1, HEATER_1_PIN)
    IO_PWM_SOFTWARE(PWMExtruder1, IOExtr1, 1)
    IO_PWM_SOFTWARE(PWMExtruder2, IOExtr2, 1)
    IO_PWM_SOFTWARE(PWMBed1, IOBed1, 1)
    // IO_OUTPUT(IOCooler1, FAN2_PIN)
    // IO_PWM_SOFTWARE(PWMCoolerExt1, FAN2_PIN, 0)

    // Define all stepper motors used
    STEPPER_SIMPLE(XMotor, IOX1Step, IOX1Dir, IOX1Enable, endstopNone, endstopNone)
    STEPPER_SIMPLE(YMotor, IOY1Step, IOY1Dir, IOY1Enable, endstopNone, endstopNone)
    STEPPER_SIMPLE(ZMotor, IOZ1Step, IOZ1Dir, IOZ1Enable, endstopNone, endstopNone)
    STEPPER_SIMPLE(E1MotorBase, IOE1Step, IOE1Dir, IOE1Enable, endstopNone, endstopNone)
    STEPPER_OBSERVEABLE(E1Motor, E1MotorBase)
    STEPPER_SIMPLE(E2MotorBase, IOE2Step, IOE2Dir, IOE2Enable, endstopNone, endstopNone)
    STEPPER_OBSERVEABLE(E2Motor, E2MotorBase)
    STEPPER_SIMPLE(AL1Motor, IOAL1Step, IOAL1Dir, IOAL1Enable, endstopNone, endstopNone)
    STEPPER_SIMPLE(AL2Motor, IOAL2Step, IOAL2Dir, IOAL2Enable, endstopNone, endstopNone)

    // Servos
    SERVO_ANALOG(Servo1, 0, Servo1Pin, 500, 2500, 1050)

    // Heat manages are used for every component that needs to
    // control temperature. Higher level classes take these as input
    // and simple heater like a heated bed use it directly.

    HEAT_MANAGER_PID(HeatedBed1, 'B', 0, TempBed1, PWMBed1, 120, 255, 1000, 5, 30000, 12.0, 33.0, 290.0, 80, 255, true)
    HEAT_MANAGER_PID(HeaterExtruder1, 'E', 0, TempExt1, PWMExtruder1, 400, 255, 1000, 10, 20000, 20.0, 0.6, 65.0, 40, 220, false)
    HEAT_MANAGER_PID(HeaterExtruder2, 'E', 1, TempExt2, PWMExtruder2, 300, 255, 1000, 10, 20000, 20.0, 0.6, 65.0, 40, 220, false)

    // HEAT_MANAGER_DYN_DEAD_TIME(HeaterExtruder1, 'E', 0, TempExt1, PWMExtruder1, 260, 255, 100, 10, 20000, 150, 7, 7, 200, 7, 7, false)
    // HEAT_MANAGER_DYN_DEAD_TIME(HeaterExtruder2, 'E', 1, TempExt2, PWMExtruder2, 260, 255, 100, 10, 20000, 150, 7, 7, 200, 7, 7, false)

    // Coolers are stand alone functions that allow it to control
    // a fan with external sensors. Many extruders require a cooling
    // fan pointer to the extruder to prevent heat rising up.
    // These can be controlled by the cooler. Since it is
    // independent you just tell what part needs cooling.
    // Other use cases are board cooling and heated chambers.

    // Define tools. They get inserted into a tool array in configuration.h
    // Typical tools are:
    // TOOL_EXTRUDER(name, offx, offy, offz, heater, stepper, resolution, yank, maxSpeed, acceleration, advance, startScript, endScript)

    TOOL_EXTRUDER(ToolExtruder1, 0, 0, 0, HeaterExtruder1, /*AL1Motor */ E1Motor, 1.75, 147.0, 5, 30, 5000, 40, "M117 Extruder 1", "", &Fan1PWM)
    TOOL_EXTRUDER(ToolExtruder2, 16.775, 0.615, -0.97, HeaterExtruder2, /*AL2Motor */ E2Motor, 1.75, 147.0, 5, 30, 5000, 40, "M117 Extruder 2\nM400\nM340 P0 S1500 R600\nG4 P300", "M340 P0 S800 R600\nG4 P300", &Fan1PWM)
    TOOL_LASER(Laser3, 0, 0, 0, Fan1NoKSPWM, fakeOut, fakeOut, 3000, 1, 100, 150.0, 1.5, "", "")
    TOOL_CNC(CNC4, 0, 0, 0, Fan1NoKSPWM, fakeOut, fakeOut, fakeOut, 7000, 3000, "", "")

    // Use a signal that changes while extruder moves
    //JAM_DETECTOR_HW(JamExtruder1, E1Motor, IOJam1, ToolExtruder1, 220, 10, 500)
    //JAM_DETECTOR_HW(JamExtruder2, E2Motor, IOJam2, ToolExtruder2, 220, 10, 500)

    // Use a signal that is high, when filament is loaded
    //FILAMENT_DETECTOR(FilamentDetector1, IOJam1, ToolExtruder1)
    //FILAMENT_DETECTOR(FilamentDetector2, IOJam2, ToolExtruder2)



  • You have several errors in configuration_io.h

    First
    // Set to nullptr for no zprobe or &endstopName for a switch
    #undef ZPROBE_ADDRESS
    #define ZPROBE_ADDRESS &IOEndstopZMin

    Is before you define IOEndstopZMin so it is undefined and causes later errors. Then this must not be the io, but the endstop 

    // Set to nullptr for no zprobe or &endstopName for a switch
    #undef ZPROBE_ADDRESS
    #define ZPROBE_ADDRESS &endstopZProbe

    with

    ENDSTOP_SWITCH_HW(endstopZMin, IOEndstopZMin, ZPROBE_AXIS, false)
    while you wrote
    ENDSTOP_SWITCH_HW(endstopZMin, IOEndstopZMin, Z_AXIS, true)

    If in doubt compare with samplesystems/Delta/Deltatower RUMBA32 which also uses the bl touch and compiles fine.

    Important also in case other things are not working. In configuration_io use defined modules (first name of parameters defines that name) only after defining them or you get later strange compile errors.
  • OK I'm one step closer now.. I had #define ZPROBE_ADDRESS before IOEndstopZMin was defined.
  • edited December 2021
    What am I doing wrong now that the bltouch wont deploy and I cant even find the signal for M340 P0 with my meter. Does it have something to do with PD15 being pin 63 in the firmware but the data sheet for stm32f4 says that is 62? Pointing to 62 didnt work on pd15 or pd14. I have a BTT rumba only because aus3d's 32 board has been sold out for months.
  • I think I'm stuck here on this issue. https://github.com/Aus3D/RUMBA32/issues/8

  • I need to try this still.
  • On my rumba32 for delta I used pin 4
    // Servo for z-probe
    IO_OUTPUT(Servo1Pin, 4)
    SERVO_ANALOG(ZProbeServo, 0, Servo1Pin, 500, 2500, 1473)

    for the servo and it works. Servos don't use real PWM so any pin should work as long as you are using the right one.

    In your script above you define servo 0 twice and differently. Not sure if the first or last will get used, but it is bad and you should only define one servo.
  • I realized that i have another servo defined but after deleting the extra one the problem remains. Is this correct for pin 4?

    #ifndef _VARIANT_ARDUINO_STM32_
    #define _VARIANT_ARDUINO_STM32_

    #define PA0 0   //D0
    #define PA1 1   //D1
    #define PA2 2   //D2
    #define PA3 A0  //D3
    #define PA4 A1  //D4
    #define PA5 5   //D5

  • Since there is no servo socket on rumba32 the correct pin is the one you connect it to. On my board I used PA4 which is pin4. That is on EXP3 center towards center. When you use a different one that is otherwise unused that is also fine.
  • I know that I can make my servo pin any unused pin. Im trying to use pin 4 like you did. I just cant get it to do anything no matter what I try. It stays 0 volts.
  • I just tried it with the deltatower sample and nothing happened.
  • It will always show 0 volt. It is a pwm signal with 50Hz and for maximum time it will be high 2.5ms 50 times per second. So at best you can expect 12,5% of 3.3v = 0.41v if multimeter does good averaging and servo is set on 2500us.

    Did you check manually using M340 if the bltouch reacts? When you are using pin 4 you can also test the rumba32 delta sample just to test bltouch works there or not ignoring all other functions.
  • I was checking manually on the delta sample. Also, I checked another printer's bltouch manually. That was a good explanation of why my meter returned those voltages on the other printer.
  • I'm at a loss here. Any more clues would be greatly appreciated.
  • I have no idea what you tested and what the results were, so hard to help. You said you tested on 2 printer but did not say which does what e.g. Also maybe just wiring of the bltouch is wrong? On pin 4 you set the serve signal pin but that only works with th eother 2 pins for gnd and 5v(or 3.3v?) connected as well correctly.

    Does multimeter show voltage changes or what values do you see. Note that with bltouch it is never off I think, just different timings between 1,5 and 2,5ms so difference is maybe 0.1V in total between highest and lowest angle.

    Also make sure no other function uses pin or signals will be wrong or if it gets set as input nothing useable.
  • Is your BLTouch set for 3.3v?
  • The meter showed changes on the other printer, ramps board. I didn't worry about what it was going to read because it is PWM. I only saw that it did change. That is not the case with anything ive tried on dev2. Maybe if i could compare more of the source code that worked for you with mine?
  • My bltouch is connected to 5v but uses 3.3v. It is bltouch with open drain mode - at least I understood it that way. On the othe rside it appears to be dead now. Not even the automatic self test on power up happens. So guess my sensor is defect.

    The rumba 32 delta config is the source that used to work when it was functional. Need time to analyse why it is not working any more for me. Maybe just a power wire broken. But think it is unrelated. When they get power I remember the did some self tests independent on pwm signal.
  • Have you fixed your bltouch?
  • No, sorry.
  • @joule5:
    Does your problem still exist?
    One year ago I built a cartesian test sample using Rumba32 and BLTouch, where BLTouch worked as Z-Min sensor.
    The project will possibly be continued the next months.

    If it helps I can dig into my documentation for the settings I used.

  • Issue still exists
  • This doesn't seem to work. IO_OUTPUT(Servo1Pin, PD15)

  • This doesn't seem to work. IO_OUTPUT(Servo1Pin, PA4)
  • Make sure you use latest firmware update. I recently did fix a bug with bltouch servo form rumba32. But with latest release it should work now.
  • It works now after updating everything. I also had to change ZProbeServo to Servo1 in zprobe.cpp.
  • That should not be required if you defined in in configuration_io.h like this
    // Servo for z-probe
    IO_OUTPUT(Servo1Pin, 4)
    SERVO_ANALOG(ZProbeServo, 0, Servo1Pin, 500, 2500, 1473)

    ZProbeServo is the name you need to give it to be used.
Sign In or Register to comment.