diff --git a/laser-cnc/lasercnc.cfg b/laser-cnc/lasercnc.cfg index 0416d98..43686b4 100644 --- a/laser-cnc/lasercnc.cfg +++ b/laser-cnc/lasercnc.cfg @@ -34,6 +34,29 @@ uart_address: 2 run_current: 0.8 stealthchop_threshold: 0 +#No Z Axis +[homing_override] +SET_KINEMATIC_POSITION: Z=0 +G28 X Y + +# Z Axis is not used +[stepper_z] +step_pin: gpio19 +dir_pin: gpio28 +enable_pin: !gpio2 +microsteps: 16 +rotation_distance: 8 +endstop_pin: ^gpio25 +position_endstop: 0.0 +position_max: 250 + +[tmc2209 stepper_z] +uart_pin: gpio9 +tx_pin: gpio8 +uart_address: 1 +run_current: 0.580 +stealthchop_threshold: 999999 + [fan] pin: gpio17 @@ -45,7 +68,7 @@ cycle_time: 0.001 shutdown_value: 0 maximum_mcu_duration: 5 -[heater_fan controller_fan] +[fan controller_fan] pin: gpio20 [mcu] @@ -56,4 +79,18 @@ kinematics: cartesian max_velocity: 300 max_accel: 3000 max_z_velocity: 5 -max_z_accel: 100 \ No newline at end of file +max_z_accel: 100 + +[gcode_macro M3] +gcode: + {% set S = params.S|default(0.0)|float %} + SET_PIN PIN=laser VALUE={S / 255.0} + +[gcode_macro M4] +gcode: + {% set S = params.S|default(0.0)|float %} + SET_PIN PIN=laser VALUE={S / 255.0} + +[gcode_macro M5] +gcode: + SET_PIN PIN=laser VALUE=0