From 4b8e6cd086ea06139df155b370993b4daffe08db Mon Sep 17 00:00:00 2001 From: siwat Date: Sun, 9 Jan 2022 16:55:03 +0700 Subject: [PATCH] Update 'laser-cnc/lasercnc.cfg' --- laser-cnc/lasercnc.cfg | 111 ++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/laser-cnc/lasercnc.cfg b/laser-cnc/lasercnc.cfg index 1b6afd7..1a56264 100644 --- a/laser-cnc/lasercnc.cfg +++ b/laser-cnc/lasercnc.cfg @@ -1,14 +1,3 @@ -# This file contains common pin mappings for the BIGTREETECH SKR mini -# E3 v2.0. To use this config, the firmware should be compiled for the -# STM32F103 with a "28KiB bootloader" and USB communication. Also, -# select "Enable extra low-level configuration options" and configure -# "GPIO pins to set at micro-controller startup" to "!PA14". - -# The "make flash" command does not work on the SKR mini E3. Instead, -# after running "make", copy the generated "out/klipper.bin" file to a -# file named "firmware.bin" on an SD card and then restart the SKR -# mini E3 with that SD card. - # See docs/Config_Reference.md for a description of parameters. [stepper_x] @@ -16,10 +5,10 @@ step_pin: PB13 dir_pin: !PB12 enable_pin: !PB14 microsteps: 16 -rotation_distance: 40 +rotation_distance: 20 endstop_pin: ^PC0 position_endstop: 0 -position_max: 235 +position_max: 594 homing_speed: 50 [tmc2209 stepper_x] @@ -27,17 +16,17 @@ uart_pin: PC11 tx_pin: PC10 uart_address: 0 run_current: 0.8 -stealthchop_threshold: 999999 +stealthchop_threshold: 0 [stepper_y] step_pin: PB10 dir_pin: !PB2 enable_pin: !PB11 microsteps: 16 -rotation_distance: 40 +rotation_distance: 20 endstop_pin: ^PC1 -position_endstop: 0 -position_max: 235 +position_endstop: 407 +position_max: 407 homing_speed: 50 [tmc2209 stepper_y] @@ -45,7 +34,7 @@ uart_pin: PC11 tx_pin: PC10 uart_address: 2 run_current: 0.8 -stealthchop_threshold: 999999 +stealthchop_threshold: 0 [stepper_z] step_pin: PB0 @@ -54,8 +43,8 @@ enable_pin: !PB1 microsteps: 16 rotation_distance: 8 endstop_pin: ^PC2 -position_endstop: 0 -position_max: 1 +position_endstop: 0.0 +position_max: 250 [tmc2209 stepper_z] uart_pin: PC11 @@ -64,26 +53,6 @@ uart_address: 1 run_current: 0.580 stealthchop_threshold: 999999 -[output_pin laser] -pin: !due:PC28 -pwm: True -hardware_pwm: True -cycle_time: 0.001 -shutdown_value: 0 -maximum_mcu_duration: 5 - -[fan] -pin: PC6 - -[mcu] -serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 - -[mcu host] -serial: /tmp/klipper_host_mcu - -[mcu due] -serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__Arduino_Due_Prog._Port_7573630323635171A112-if00 - [printer] kinematics: cartesian max_velocity: 300 @@ -91,25 +60,67 @@ max_accel: 3000 max_z_velocity: 5 max_z_accel: 100 -[static_digital_output usb_pullup_enable] -pins: !PA14 +[mcu] +serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AH06OETN-if00-port0 -[board_pins] -aliases: - # EXP1 header - EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=, - EXP1_2=PA15, EXP1_4=, EXP1_6=PB9, EXP1_8=PB15, EXP1_10=<5V> +[mcu due] +serial: /dev/serial/by-id/usb-Arduino__www.arduino.cc__Arduino_Due_Prog._Port_857353136323516170E0-if00 + +[output_pin laser_en] +pin: due:PB25 #D2 +pwm: True +hardware_pwm: True +shutdown_value: 0 + +[output_pin laser_pwr] +pin: due:PC28 #D3 +pwm: True +hardware_pwm: True +cycle_time: 0.00006 +shutdown_value: 0 + +[output_pin compressor] +pin: due:PC22 #D8 +pwm: True +hardware_pwm: True +shutdown_value: 0 + +[fan_generic vent] +pin: due:PC21 #D9 +hardware_pwm: True +shutdown_speed: 1.0 + +[virtual_sdcard] +path: ~/.octoprint/uploads/ + +[respond] +default_type: echo [gcode_macro M3] gcode: {% set S = params.S|default(0.0)|float %} - SET_PIN PIN=laser VALUE={S / 255.0} + {% if S == 0.0 %} + SET_PIN PIN=laser_en VALUE=0.0 + {% else %} + SET_PIN PIN=laser_en VALUE=1.0 + {% endif %} + SET_PIN PIN=laser_pwr VALUE={S / 255.0} [gcode_macro M4] gcode: {% set S = params.S|default(0.0)|float %} - SET_PIN PIN=laser VALUE={S / 255.0} + SET_PIN PIN=laser_en VALUE=1.0 + SET_PIN PIN=laser_pwr VALUE={S / 255.0} [gcode_macro M5] gcode: - SET_PIN PIN=laser VALUE=0 \ No newline at end of file + SET_PIN PIN=laser_en VALUE=0.0 + SET_PIN PIN=laser_pwr VALUE=0.0 + +[gcode_macro M8] +gcode: + SET_PIN PIN=compressor VALUE=1.0 + +[gcode_macro M9] +gcode: + SET_PIN PIN=compressor VALUE=0.0 \ No newline at end of file