├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── ask-a-question.md │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── ai-security-check-for-pr.yml │ ├── greet.yml │ ├── linter.yml │ └── md_links.yml ├── .gitignore ├── .shellcheckrc ├── Adaptive_Mesh.cfg ├── Adaptive_Purge.cfg ├── KlipperScreen.conf ├── LICENSE ├── README.md ├── audio └── beep.wav ├── crowsnest.conf ├── dev ├── CALIBRATION_EXAMPLE.cfg ├── CHANGE_FILAMENT.cfg ├── CIRCLE_WIPE.cfg ├── LOAD_FILAMENT.cfg ├── MOM600.cfg ├── PAUSE.cfg ├── PRINT_DATA.cfg ├── RESUME.cfg ├── TOOLHEAD_PPC.cfg ├── UNLOAD_FILAMENT.cfg ├── append_text.sh ├── discord_print.cfg ├── dual_sensors.cfg ├── mcu_backup.cfg ├── print │ ├── README.md │ ├── print_config.cfg │ ├── print_dev.cfg │ ├── print_extras.cfg │ ├── print_macros.cfg │ └── print_variables.cfg ├── print_area_bed_mesh.cfg ├── print_data.txt ├── reddit_help.cfg ├── sensorless_homing.cfg ├── shutdowner.cfg └── stealthburner.cfg ├── extras ├── BED_PREP.cfg ├── CANBOOT_ebb toolboard_canbus.bin ├── CANBOOT_ebb2209_canbus.png ├── CANBOOT_ebb_toolboard_canbus.png ├── CANBOOT_octopus_canbridge.png ├── CLEAN_NOZZLE.cfg ├── DELAYED_CODER.cfg ├── DO_VARIABLES.cfg ├── GET_GAS.cfg ├── GET_POSITION_STATS.cfg ├── KLIPPER_ebb toolboard_canbus.bin ├── KLIPPER_ebb2209_canbus_canboot.png ├── KLIPPER_ebb_toolboard_canbus.png ├── KLIPPER_ebb_toolboard_canbus_no-canboot.png ├── KLIPPER_octopus_canbridge.png ├── LAZY_HOME.cfg ├── MESH_CHECK.cfg ├── PrusaSlicer_config_bundle.ini ├── REBOOT_HOST.cfg ├── REBUILD_MESH.cfg ├── SET_MATERIAL.cfg ├── SET_RETRACT_DISTANCE.cfg ├── SuperSlicer_config_bundle.ini ├── TEST_START-deltchar.cfg ├── backup-mainsail.json ├── bedfans.cfg ├── caselight.cfg ├── chamber_display.cfg ├── clean_backups │ ├── README.md │ ├── clean_backups.cfg │ ├── clean_backups.sh │ └── move_files.sh ├── conditional.cfg ├── delayed_printer_off.cfg ├── fan_rules.cfg ├── filament_change │ ├── README.md │ ├── smart-m600.cfg │ └── smart-m600_dev.cfg ├── filament_switch_runout.cfg ├── fix_scripts │ ├── fix_scripts.cfg │ └── fix_scripts.sh ├── fluidd.cfg ├── heat_soak.cfg ├── led.cfg ├── led_control │ └── simple-stealthburner_leds.cfg ├── led_progress.cfg ├── led_warmup.cfg ├── loadgraph.png ├── mainsail.cfg ├── mesh_toggler.cfg ├── old_machine │ ├── BEEPER.cfg │ ├── creality-mechanics.cfg │ ├── environment.cfg │ ├── pi2c.cfg │ ├── skr-pico.cfg │ ├── tool-board-primary.cfg │ ├── tool-board.cfg │ ├── webcam.conf │ └── webcam.txt ├── pa_cal.cfg ├── pi_gpio_pinout.png ├── picanpi.cfg ├── restart_klipperscreen │ ├── README.md │ ├── RESTART_KLIPPERSCREEN.cfg │ └── restart_ks.sh ├── rp2040_pico_can.png ├── rp2040_pico_usb.png ├── samples │ ├── README │ ├── environment.cfg │ ├── mooncord.json │ ├── moonraker_secrets.ini │ ├── printer.cfg │ ├── telegram.conf │ ├── telegram_config.conf │ └── variables.cfg ├── sensorless_homing_override.cfg ├── shaper │ ├── ADXL_SHAPER.cfg │ ├── README.md │ ├── adxl_shape_x.sh │ └── adxl_shape_y.sh ├── simple-m600.cfg ├── skr-pico_canbridge.png ├── skr-pico_canbridge.uf2 ├── smart-m600.cfg ├── start_print_heat_soak.cfg ├── start_soak.cfg ├── stm32_mini12864_usb.png ├── tool_swap │ ├── README.md │ ├── swap_tools.cfg │ ├── tool1.cfg │ ├── tool2.cfg │ └── tool_swap.sh ├── weight_scale.py ├── wled_cfg.json ├── wled_presets.json └── z_hop_overrides.cfg ├── guides ├── GUIDE-axis_limits.md ├── GUIDE-index.md ├── GUIDE-links.md ├── GUIDE-macros.md ├── GUIDE-mesh.md ├── GUIDE-probe.md ├── GUIDE-usb-pico.md ├── GUIDE-variables.md ├── Guide-pico_can.md ├── README.md └── resources │ ├── GET_PROBE_LIMITS.cfg │ ├── PicoCAN-jst.jpg │ ├── PicoCAN-trans.jpg │ ├── SKRPico-jumpers.png │ ├── SKRPico-menuconfig.png │ ├── bed_mesh_diagram.png │ ├── can-trans-uart.jpg │ ├── can-trans.jpg │ ├── first_layer1.png │ ├── first_layer2.png │ ├── first_layer3.png │ ├── offset-diagram.png │ ├── pretty_header.png │ └── skr-pico_uart.jpg ├── ledcontrol.cfg ├── machine ├── air_filter_timer.cfg ├── aliases.cfg ├── bed-board.cfg ├── chamber.cfg ├── display-board.cfg ├── display.cfg ├── fans.cfg ├── filament.cfg ├── host.cfg ├── mechanics.cfg ├── menu.cfg ├── mini12864.cfg ├── neopixel.cfg ├── pin-board.cfg ├── print_variables.cfg ├── shell_command.cfg ├── skr-pico.cfg ├── stealthburner_led_effects_barf.cfg ├── toolboard.cfg └── zippy.cfg ├── macros ├── ADXL_SHAPER.cfg ├── ALERT_BEEP.cfg ├── BED_PREP.cfg ├── BEGIN_LAYER.cfg ├── CANCEL_PRINT.cfg ├── CHAMBER_TEMP.cfg ├── CLEAN_NOZZLE.cfg ├── COMPARE_VALUES.cfg ├── CONFIG_SAVER.cfg ├── G27.cfg ├── G29.cfg ├── GCODE_TTS.cfg ├── GET_PROBE_LIMITS.cfg ├── GO_HOME.cfg ├── HEAT_SOAK.cfg ├── INITIALIZE_VARIABLE.cfg ├── LAZY_HOME.cfg ├── LEVEL_BED_NOW.cfg ├── M17.cfg ├── M204.cfg ├── M205.cfg ├── M300.cfg ├── M420.cfg ├── M73.cfg ├── M900.cfg ├── MAINTENANCE.cfg ├── MESH_CHECK.cfg ├── MOVE_PERCENT.cfg ├── NOTIFY.cfg ├── PARKING.cfg ├── PAUSE_PARK.cfg ├── PAUSE_RESUME.cfg ├── PID_TUNE.cfg ├── POST_END.cfg ├── POWER_CONTROL.cfg ├── PRESENT_PRINT.cfg ├── PRE_START.cfg ├── PRIME_NOZZ.cfg ├── PRINT_STATS.cfg ├── PUBLISH_ALERT.cfg ├── README.md ├── RESTART_KLIPPERSCREEN.cfg ├── RETRACT.cfg ├── SAVE_AT_END.cfg ├── SAVE_IF_SET.cfg ├── SCHEDULE_LAYER.cfg ├── SCRUB_TIMER.cfg ├── SEARCH_VARS.cfg ├── SET_ADV_VELOCITY.cfg ├── SET_IDLER.cfg ├── SET_MATERIAL.cfg ├── START_HEAT_SOAK.cfg ├── START_PRINT.cfg ├── TARGET_FAN.cfg ├── TELEGRAM.cfg ├── TEST_RESONANCES.cfg ├── TEST_SPEED.cfg ├── TEST_STATE.cfg ├── UNSAFE_RAISE_TOOL.cfg ├── WIPE_LINE.cfg ├── WLED.cfg ├── ZIPPYSTATS.cfg ├── clean_backups.cfg ├── heater_overrides.cfg ├── mech_gantry_cal.cfg ├── pressure_advance.cfg ├── simple-m600.cfg ├── smart_homing.cfg ├── test_mesh_wait.cfg ├── tunes.cfg └── wake_extruder.cfg ├── moonraker-obico-update.cfg ├── moonraker-zippy.conf ├── moonraker.conf ├── moonraker.conf.backup ├── probe ├── crtouch-probe.cfg ├── klicky-bed-mesh-calibrate.cfg ├── klicky-macros.cfg ├── klicky-probe.cfg ├── klicky-screws-tilt-calculate.cfg ├── klicky-variables.cfg └── klicky-z-tilt-adjust.cfg ├── scripts ├── clean_backups.sh ├── datetime.sh ├── fix_os_stuff.sh ├── fix_scripts.sh ├── git_backup.sh ├── invert_file.sh ├── kamp_patch.sh ├── mcu_timing.sh ├── move_files.sh └── restart_ks.sh ├── shaper ├── ADXL_SHAPER.cfg ├── README.md ├── adxl_shape_x.sh └── adxl_shape_y.sh ├── sonar.conf └── timelapse.cfg /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: rootiest 2 | custom: ['paypal.me/rootiest'] 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ask-a-question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Ask a question 3 | about: Ask a question about this project or anything printing-related 4 | title: "[QUESTION]" 5 | labels: question 6 | assignees: "" 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Clearly outline your question** 13 | A clear and concise outline of what you are trying to ask. 14 | 15 | > We aren't mind-readers! 16 | 17 | **Describe your hypothesis** 18 | Make a guess at what you think the answer is. 19 | We don't expect you to know if you are asking. 20 | But give us an idea where your thinking is at! 21 | 22 | **Steps you've taken already** 23 | Please provide a summary of any steps you have attempted already. 24 | 25 | - Links to other resources where you looked for solutions. 26 | - What you've already tried yourself 27 | - Where you looked/google searches you performed. 28 | 29 | > Make an effort to try to solve the problem yourself first before opening a ticket. 30 | 31 | **Additional context** 32 | If applicable, include any other context or screenshots about the feature request here. 33 | 34 | **Checklist** 35 | 36 | - [ ] I have included a clear description of the question 37 | - [ ] I have included a description of my hypothesis 38 | - [ ] I have included a summary of the steps I've taken already 39 | - [ ] I have included any relevant screenshots or videos 40 | - [ ] I have included any other context about the question here 41 | - [ ] I have made an effort to try to solve the problem myself first before opening a ticket 42 | - [ ] I have remembered to stay calm and have fun! 43 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG]" 5 | labels: bug 6 | assignees: "" 7 | --- 8 | 9 | **Describe the bug** 10 | A clear and concise description of what the bug is. 11 | 12 | **To Reproduce** 13 | Please provide detailed steps to reproduce the issue, including any relevant configuration settings or input files. 14 | 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, attach screenshots or videos to help explain your problem. 25 | 26 | **Klippy log** 27 | Please attach your Klipper log to help diagnose the problem. 28 | 29 | **Klipper Config** 30 | If applicable, attach your Klipper config to help diagnose the problem. 31 | 32 | **Other Files** 33 | If applicable, attach any other files such as gcode files or stl files to help diagnose the problem. 34 | 35 | **Zippy Files Used and Guides Followed** 36 | If applicable, list any zippy files you used or guides you followed to help diagnose the problem or that you think may be related to the problem. Please include links to the specific zippy macros or config files you used. 37 | 38 | **Additional context** 39 | Add any other context about the problem here. 40 | 41 | **Checklist** 42 | 43 | - [ ] I have included a clear description of the bug 44 | - [ ] I have included detailed steps to reproduce the issue 45 | - [ ] I have included any relevant configuration settings or input files 46 | - [ ] I have included any relevant screenshots or videos 47 | - [ ] I have included my Klipper log 48 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FEATURE]" 5 | labels: enhancement 6 | assignees: "" 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 11 | 12 | **Describe the solution you'd like** 13 | A clear and concise description of what you want to happen. 14 | 15 | **Describe alternatives you've considered** 16 | A clear and concise description of any alternative solutions or features you've considered. 17 | 18 | **Additional context** 19 | Add any other context or screenshots about the feature request here. 20 | 21 | **Checklist** 22 | 23 | - [ ] I have included a clear description of the feature 24 | - [ ] I have included a description of the solution 25 | - [ ] I have included any alternative solutions or features I've considered 26 | - [ ] I have included any relevant screenshots or videos 27 | -------------------------------------------------------------------------------- /.github/workflows/ai-security-check-for-pr.yml: -------------------------------------------------------------------------------- 1 | name: AI Security Check for Pull Requests 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | ai_security_check_for_pull_requests: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Check out repository 14 | uses: actions/checkout@v2 15 | 16 | - name: Set up Node.js 17 | uses: actions/setup-node@v2 18 | with: 19 | node-version: 16 20 | 21 | - name: Install dependencies 22 | run: npm ci 23 | 24 | - name: Finding security and privacy code vulnerabilities 25 | id: ai_security_check 26 | uses: obetomuniz/ai-security-check-for-pull-requests-action@v1.0.0 27 | env: 28 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | GH_REPOSITORY: ${{ github.repository }} 30 | GH_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.number }} 31 | OPENAI_TOKEN: ${{ secrets.OCO_OPENAI_API_KEY }} 32 | 33 | - name: Comment on pull request 34 | uses: actions/github-script@v6 35 | env: 36 | PR_COMMENT: ${{ steps.ai_security_check.outputs.pr_comment }} 37 | with: 38 | github-token: ${{ secrets.GITHUB_TOKEN }} 39 | script: | 40 | const prComment = process.env.PR_COMMENT || "No security or privacy issues found."; 41 | const { data } = await github.rest.issues.createComment({ 42 | issue_number: context.issue.number, 43 | owner: context.repo.owner, 44 | repo: context.repo.repo, 45 | body: prComment 46 | }); 47 | -------------------------------------------------------------------------------- /.github/workflows/greet.yml: -------------------------------------------------------------------------------- 1 | name: Greet New Contributors 2 | on: 3 | issues: 4 | types: [opened] 5 | pull_request: 6 | types: [opened] 7 | jobs: 8 | greet: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/first-interaction@v1 12 | with: 13 | repo-token: ${{ secrets.GITHUB_TOKEN }} 14 | issue-message: '# Welcome ${{ github.actor }}!\nCongrats on creating your first issue.\nPlease follow the issue template to help us resolve your issue quickly.' 15 | pr-message: '# Welcome ${{ github.actor }}!\nCongrats on creating your first pull request.\nPlease follow the pull request template to help us review your pull request quickly and effectively.' 16 | -------------------------------------------------------------------------------- /.github/workflows/linter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ################################# 3 | ################################# 4 | ## Super Linter GitHub Actions ## 5 | ################################# 6 | ################################# 7 | name: Lint Code Base 8 | 9 | ############################# 10 | # Start the job on all push # 11 | ############################# 12 | on: 13 | push: 14 | pull_request: 15 | branches: [master, main] 16 | 17 | ############### 18 | # Set the Job # 19 | ############### 20 | jobs: 21 | build: 22 | # Name the Job 23 | name: Lint Code Base 24 | # Set the agent to run on 25 | runs-on: ubuntu-latest 26 | 27 | ############################################ 28 | # Grant status permission for MULTI_STATUS # 29 | ############################################ 30 | permissions: 31 | contents: read 32 | packages: read 33 | statuses: write 34 | 35 | ################## 36 | # Load all steps # 37 | ################## 38 | steps: 39 | ########################## 40 | # Checkout the code base # 41 | ########################## 42 | - name: Checkout Code 43 | uses: actions/checkout@v3 44 | with: 45 | # Full git history is needed to get a proper 46 | # list of changed files within `super-linter` 47 | fetch-depth: 0 48 | 49 | ################################ 50 | # Run Linter against code base # 51 | ################################ 52 | - name: Lint Code Base 53 | uses: github/super-linter@v5 54 | env: 55 | VALIDATE_ALL_CODEBASE: false 56 | DEFAULT_BRANCH: master 57 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 58 | -------------------------------------------------------------------------------- /.github/workflows/md_links.yml: -------------------------------------------------------------------------------- 1 | name: Check Links 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | markdown-link-check: 8 | name: Check markdown files 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | 13 | - name: Markdown links check 14 | uses: ruzickap/action-my-markdown-link-checker@v1.1.0 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | moonraker_secrets.ini 3 | telegram*.conf 4 | *.bkp 5 | *.backup 6 | printer*.cfg 7 | variables.cfg 8 | mooncord.json 9 | resonances_*.csv 10 | moonraker-obico.cfg 11 | *shaper_calibrate_*.png 12 | */shaper_calibrate_*.png 13 | **/shaper_calibrate_*.png -------------------------------------------------------------------------------- /.shellcheckrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Don't want to escape a single quote? 4 | disable=SC1003 5 | 6 | # Don't use a ( subshell ) to avoid having to cd back. 7 | disable=SC2103 8 | 9 | # Don't check exit code directly with e.g. 'if mycmd;', not indirectly with $?. 10 | disable=SC2181 11 | -------------------------------------------------------------------------------- /audio/beep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/audio/beep.wav -------------------------------------------------------------------------------- /crowsnest.conf: -------------------------------------------------------------------------------- 1 | #### crowsnest.conf 2 | #### This is mainsail / MainsailOS default config. 3 | #### See: 4 | #### https://github.com/mainsail-crew/crowsnest/blob/master/README.md 5 | #### for details to configure to your needs. 6 | 7 | 8 | ##################################################################### 9 | #### ##### 10 | #### Information about ports and according URL's ##### 11 | #### ##### 12 | ##################################################################### 13 | #### ##### 14 | #### Port 8080 equals /webcam/?action=[stream/snapshot] ##### 15 | #### Port 8081 equals /webcam2/?action=[stream/snapshot] ##### 16 | #### Port 8082 equals /webcam3/?action=[stream/snapshot] ##### 17 | #### Port 8083 equals /webcam4/?action=[stream/snapshot] ##### 18 | #### ##### 19 | ##################################################################### 20 | 21 | 22 | [crowsnest] 23 | log_path: ~/printer_data/logs/crowsnest.log 24 | log_level: verbose # Valid Options are quiet/verbose/debug 25 | delete_log: false # Deletes log on every restart, if set to true 26 | 27 | [cam printer] 28 | mode: mjpg # mjpg/rtsp 29 | port: 8080 # Port 30 | device: /dev/video1 # See Log for available ... 31 | resolution: 1920x1080 # widthxheight format 32 | max_fps: 10 # If Hardware Supports this it will be forced, ohterwise ignored/coerced. 33 | #custom_flags: # You can run the Stream Services with custom flags. 34 | 35 | [cam bed] 36 | mode: mjpg # mjpg/rtsp 37 | port: 8081 # Port 38 | device: /dev/video0 # See Log for available ... 39 | resolution: 1920x1080 # widthxheight format 40 | max_fps: 10 # If Hardware Supports this it will be forced, ohterwise ignored/coerced. 41 | #v4l2ctl: options bcm2835-v4l2 max_video_width=2592 max_video_height=1944 42 | -------------------------------------------------------------------------------- /dev/CALIBRATION_EXAMPLE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro CALIBRATION_PROCEDURE] 2 | gcode: 3 | SAVE_VARIABLE VARIABLE=calibration_active VALUE=1 4 | 5 | # Do your calibration steps, call the macros, whatever 6 | CALIBRATE 7 | DELTA_CALIBRATE_SAFE 8 | BED_MESH_CALIBRATE 9 | # I don't know what order you are doing them 10 | 11 | SAVE_VARIABLE VARIABLE=calibration_active VALUE=0 12 | 13 | [delayed_gcode startup_calibration] 14 | initial_duration: 10 15 | gcode: 16 | {% set svv = printer.save_variables.variables %} 17 | {% if svv.calibration_active == 0 %} 18 | # If calibration wasn't stopped early, run calibration at boot 19 | CALIBRATION_PROCEDURE 20 | {% endif %} -------------------------------------------------------------------------------- /dev/CHANGE_FILAMENT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro CHANGE_FILAMENT] 2 | description: Change the filament in toolhead 3 | gcode: 4 | M600 -------------------------------------------------------------------------------- /dev/CIRCLE_WIPE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro CIRCLE_WIPE] 2 | gcode: 3 | # Adjust these if necessary to fit on your bed 4 | {% set X_MAX = printer.toolhead.axis_maximum.x|default(200)|float %} 5 | {% set Y_MAX = printer.toolhead.axis_maximum.y|default(200)|float %} 6 | {% set X_MIN = printer.toolhead.axis_minimum.x|default(0)|float %} 7 | {% set Y_MIN = printer.toolhead.axis_minimum.y|default(0)|float %} 8 | 9 | {% set X_CENTER = ((X_MIN + X_MAX) * 0.5) %} 10 | {% set Y_CENTER = ((Y_MIN + Y_MAX) * 0.5) %} 11 | {% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %} 12 | {% set PRIMER_HEIGHT = 0.70 * NOZZLE %} 13 | {% if printer.toolhead.homed_axes != "xyz" %} 14 | {action_respond_info("Please home XYZ first")} 15 | {% elif printer.extruder.can_extrude != True %} 16 | {action_respond_info("Extruder temperature too low")} 17 | {% else %} 18 | SAVE_GCODE_STATE NAME=WIPE_LINE_state 19 | M117 Priming nozzle 20 | M82 21 | G90 22 | G92 E0 23 | G1 X{X_MIN} Y{Y_CENTER} Z3 F2500 24 | G1 X{X_MIN} Y{Y_CENTER} Z{PRIMER_HEIGHT} F5000.0 25 | G2 X{X_MAX} Y{Y_CENTER} I{X_CENTER} J{Y_CENTER} F1800 26 | G2 X{X_MIN} Y{Y_CENTER} I{X_CENTER} J{Y_CENTER} F1800 27 | RESTORE_GCODE_STATE NAME=WIPE_LINE_state MOVE=0 28 | M117 Priming complete 29 | {% endif %} 30 | 31 | # This is necessary to use G2/G3 commands: 32 | [gcode_arcs] -------------------------------------------------------------------------------- /dev/LOAD_FILAMENT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro LOAD_FILAMENT] 2 | description: Load filament into toolhead 3 | gcode: 4 | M701 -------------------------------------------------------------------------------- /dev/PAUSE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro PAUSE] 2 | description: Pause the actual running print 3 | rename_existing: PAUSE_BASE 4 | gcode: 5 | M117 Print Paused 6 | STATUS_BUSY 7 | WLED_ON PRESET=3 8 | #SET_IDLER TIME=18000 POWER=1 EXTRUDER=0 BED=1 CHAMBER=1 STEPPERS=1 9 | PAUSE_BASE 10 | _TOOLHEAD_PARK_PAUSE_CANCEL -------------------------------------------------------------------------------- /dev/RESUME.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro RESUME] 2 | description: Resume the actual running print 3 | rename_existing: RESUME_BASE 4 | gcode: 5 | ##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro ##### 6 | {% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %} 7 | #### get VELOCITY parameter if specified #### 8 | {% if 'VELOCITY' in params|upper %} 9 | {% set get_params = ('VELOCITY=' + params.VELOCITY) %} 10 | {%else %} 11 | {% set get_params = "" %} 12 | {% endif %} 13 | ##### end of definitions ##### 14 | {% if printer.extruder.can_extrude|lower == 'true' %} 15 | #SET_IDLE_TIMEOUT TIMEOUT=600 16 | M83 17 | G1 E{extrude} F2100 18 | {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %} 19 | {% else %} 20 | {action_respond_info("Extruder not hot enough")} 21 | {% endif %} 22 | M117 Print resumed 23 | WLED_ON PRESET=1 24 | STATUS_PRINTING 25 | start_tones 26 | SET_IDLER TIME=900 POWER=0 27 | RESUME_BASE {get_params} -------------------------------------------------------------------------------- /dev/UNLOAD_FILAMENT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro UNLOAD_FILAMENT] 2 | description: Unload filament from toolhead 3 | gcode: 4 | M702 -------------------------------------------------------------------------------- /dev/append_text.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2023 Chris Laprade 4 | # 5 | # This file is part of zippy_config. 6 | # 7 | # zippy_config is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # zippy_config is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with zippy_config. If not, see . 19 | 20 | usage() { 21 | echo "Usage: $0 [-t source_text] [-f source_file] [-h] target_file" 22 | echo "" 23 | echo "Append contents of a file or specified text to another file" 24 | echo "" 25 | echo "Options:" 26 | echo " -t source_text specify the text to be appended to the target file" 27 | echo " -f source_file specify the source file whose contents will be appended to the target file" 28 | echo " -h display this help and exit" 29 | exit 1 30 | } 31 | 32 | if [ $# -lt 1 ]; then 33 | usage 34 | fi 35 | 36 | while getopts "t:f:h" opt; do 37 | case $opt in 38 | t) source_text="$OPTARG";; 39 | f) source_file="$OPTARG";; 40 | h) usage;; 41 | *) echo "Invalid option: -$OPTARG" >&2; exit 1;; 42 | esac 43 | done 44 | shift $((OPTIND-1)) 45 | target_file="$1" 46 | 47 | if [ -n "$source_file" ]; then 48 | if [ ! -f "$source_file" ]; then 49 | echo "Error: $source_file does not exist or is not a regular file." 50 | exit 1 51 | fi 52 | cat "$source_file" >> "$target_file" 53 | echo "Contents of $source_file successfully appended to $target_file." 54 | elif [ -n "$source_text" ]; then 55 | echo "$source_text" >> "$target_file" 56 | echo "Text '$source_text' successfully appended to $target_file." 57 | else 58 | echo "Error: Neither source text nor file provided" 59 | exit 1 60 | fi -------------------------------------------------------------------------------- /dev/dual_sensors.cfg: -------------------------------------------------------------------------------- 1 | [filament_motion_sensor extruder0] 2 | pause_on_runout: False ; pause handled by macro 3 | runout_gcode: 4 | FILAMENT_RUNOUT EXTRUDER=0 ; trigger filament runout 5 | 6 | [filament_motion_sensor extruder1] 7 | pause_on_runout: False ; pause handled by macro 8 | runout_gcode: 9 | FILAMENT_RUNOUT EXTRUDER=1 ; trigger filament runout 10 | 11 | [gcode_macro filament_runout] 12 | variable_extruder: 0 13 | gcode: 14 | {% set runout = params.extruder|int|default(0) %} 15 | {% if extruder == 0 and runout == 0 %} 16 | M600 17 | {% elif extruder == 1 and runout == 1 %} 18 | M600 19 | {% endif %} 20 | 21 | [gcode_macro T0] 22 | gcode: 23 | SET_GCODE_VARIABLE MACRO=filament_runout VARIABLE=extruder VALUE=0 24 | # etc 25 | 26 | [gcode_macro T1] 27 | gcode: 28 | SET_GCODE_VARIABLE MACRO=filament_runout VARIABLE=extruder VALUE=1 29 | # etc -------------------------------------------------------------------------------- /dev/mcu_backup.cfg: -------------------------------------------------------------------------------- 1 | # Extruder and hotend 2 | #[extruder] 3 | #step_pin: STP_E 4 | #dir_pin: DIR_E 5 | #enable_pin: !STP_EN 6 | #microsteps: 16 7 | #rotation_distance: 24.395 8 | #nozzle_diameter: 0.400 9 | #filament_diameter: 1.750 10 | #max_extrude_only_distance: 100.0 11 | #max_extrude_cross_section: 50.0 12 | #min_extrude_temp: 180 13 | #pressure_advance = 0.055 14 | #smooth_time: 0.500 15 | #heater_pin: HEAT_E 16 | #sensor_type: EPCOS 100K B57560G104F 17 | #sensor_pin: THERM_E 18 | 19 | #control = pid 20 | #pid_kp = 25.809 21 | #pid_ki = 1.399 22 | #pid_kd = 119.044 23 | #min_temp: 0 24 | #max_temp: 280 25 | 26 | # Part cooling fan 27 | #[fan] 28 | #pin: PC_FAN 29 | 30 | # ABL Probe 31 | #[bltouch] 32 | #sensor_pin: ^PROBE_OUT 33 | #control_pin: PROBE_IN 34 | #x_offset: -44 35 | #y_offset: -7 36 | #z_offset: 2.295 37 | #probe_with_touch_mode: True 38 | #stow_on_each_sample: False 39 | #samples: 2 40 | #samples_tolerance: 0.0125 41 | #samples_tolerance_retries: 5 42 | 43 | # Probing position 44 | #[safe_z_home] 45 | #home_xy_position: 164, 136 46 | #speed: 220 47 | #z_hop: 5 48 | #z_hop_speed: 100 49 | #move_to_previous: True 50 | 51 | # Bed Mesh config 52 | #[bed_mesh] 53 | #speed: 220 54 | #horizontal_move_z: 5 55 | #mesh_min: 10, 10 56 | #mesh_max: 196, 205 57 | #probe_count: 10,10 58 | #mesh_pps: 5, 5 59 | #algorithm: bicubic 60 | 61 | # Bed screw position and type 62 | #[screws_tilt_adjust] 63 | #screw1: 83,43 64 | #screw1_name: front left screw 65 | #screw2: 250,43 66 | #screw2_name: front right screw 67 | #screw3: 250,210 68 | #screw3_name: rear right screw 69 | #screw4: 83,210 70 | #screw4_name: rear left screw 71 | #horizontal_move_z: 10 72 | #speed: 50 73 | #screw_thread: CW-M4 74 | 75 | # Smart Filament Runout Sensor 76 | #[filament_motion_sensor smart_filament_sensor] 77 | #detection_length: 7.0 78 | #extruder: extruder 79 | #switch_pin: SFS_RUNOUT 80 | #pause_on_runout: false #pause handled by macro 81 | #runout_gcode: 82 | # FILAMENT_RUNOUT 83 | #insert_gcode: 84 | # M117 Filament inserted 85 | #event_delay: 3.0 86 | #pause_delay: 0.0001 87 | 88 | # Pin aliases 89 | [board_pins] 90 | aliases: 91 | EXP1_1=PC6,EXP1_3=PB10,EXP1_5=PB14,EXP1_7=PB12,EXP1_9=, 92 | EXP1_2=PB2,EXP1_4=PB11,EXP1_6=PB13,EXP1_8=PB15,EXP1_10=<5V>, 93 | PROBE_IN=PB0, PROBE_OUT=PB1, 94 | FIL_RUNOUT=PC6, SFS_RUNOUT=PA4, 95 | STP_EN=PC3, PC_FAN=PA0, 96 | STP_X=PC2, DIR_X=PB9, END_X=PA5, 97 | STP_Y=PB8, DIR_Y=PB7, END_Y=PA6, 98 | STP_Z=PB6, DIR_Z=PB5, END_Z=PA7, 99 | STP_E=PB4, DIR_E=PB3, HEAT_E=PA1, THERM_E=PC5, 100 | HEAT_B=PA2, THERM_B=PC4 -------------------------------------------------------------------------------- /dev/print/print_config.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Print Configuration # 3 | # Version 2.1.5 2023-1-20 # 4 | ##################################### 5 | 6 | # This is the main config file which 7 | # should be added/included to your 8 | # printer.cfg file. 9 | # 10 | # The other files are included by this 11 | # one using the lines below: 12 | 13 | # Mandatory includes: 14 | [include print_variables.cfg] 15 | [include print_macros.cfg] 16 | 17 | # Optional includes: 18 | [include print_extras.cfg] 19 | # Unstable Development: 20 | #[include print_dev.cfg] 21 | 22 | # Please comment/uncomment any of the 23 | # optional sections above that you would 24 | # like to use. 25 | 26 | 27 | # Allow printing from gcode files 28 | [virtual_sdcard] 29 | # Edit this path if you are using multiple instances 30 | path: ~/printer_data/gcodes 31 | on_error_gcode: 32 | # Tell the printer to run CANCEL_PRINT if an error occurs during printing 33 | CANCEL_PRINT 34 | 35 | # Console output 36 | # Use variable_output: 118 37 | [respond] 38 | 39 | # Display output 40 | # Use variable_output: 117 41 | [display_status] 42 | 43 | # Silence output 44 | # Use variable_output: 116 45 | [gcode_macro M116] 46 | description: Silent status feedback 47 | gcode: 48 | 49 | # Dual output 50 | # Use variable_output: 1187 or 1178 51 | [gcode_macro M1187] 52 | description: Dual status feedback 53 | gcode: 54 | M117 {rawparams} 55 | M118 {rawparams} 56 | [gcode_macro M1178] 57 | gcode: 58 | M1187 {rawparams} 59 | 60 | 61 | # Manage individual objects 62 | [exclude_object] 63 | 64 | # Save persistent variables 65 | [save_variables] 66 | # Edit this file path if you are running multiple instances 67 | filename: ~/printer_data/config/variables.cfg 68 | 69 | # Idle timer 70 | [idle_timeout] 71 | timeout: 900 72 | gcode: _IDLER ; Run the idler macro 73 | 74 | 75 | ############################### 76 | ### Filament Switch Sensor #### 77 | ### https://www.klipper3d.org/Config_Reference.html#filament_switch_sensor ### 78 | ############################### 79 | #[filament_switch_sensor filament_sensor] 80 | #switch_pin: ^PB6 81 | #pause_on_runout: False ; pause handled by macro 82 | #runout_gcode: 83 | # FILAMENT_RUNOUT ; trigger filament runout 84 | #insert_gcode: 85 | # LOAD_FILAMENT ; trigger filament load 86 | 87 | ############################### 88 | ### Filament Motion Sensor #### 89 | ### https://www.klipper3d.org/Config_Reference.html#filament_motion_sensor ### 90 | ############################### 91 | #[filament_motion_sensor smart_filament_sensor] 92 | #switch_pin: ^PB6 93 | #detection_length: 7.0 94 | #extruder: extruder 95 | #pause_on_runout: False ; pause handled by macro 96 | #runout_gcode: 97 | # FILAMENT_RUNOUT ; trigger filament runout 98 | #insert_gcode: 99 | # LOAD_FILAMENT ; trigger filament load -------------------------------------------------------------------------------- /dev/print_data.txt: -------------------------------------------------------------------------------- 1 | [gcode_macro _PRINT_DATA] 2 | variable_first_layer_hotend_temp: 0 3 | variable_first_layer_bed_temp: 0 4 | variable_hotend_temp: 0 5 | variable_bed_temp: 0 6 | variable_chamber_temp: 0 7 | variable_material_type: 'PLA' 8 | variable_material_color: 000000 9 | variable_nozzle_diameter: 0.4 10 | variable_filament_diameter: 1.75 11 | variable_filament_density: 0 12 | variable_extrusion_multiplier: 1.0 13 | variable_filament_shrink: 100 14 | variable_print_scale: 1.0 15 | variable_max_print_speed: 0 16 | variable_filament_max_speed: 0 17 | variable_max_volumetric_speed: 0 18 | variable_filament_preset: 'PLA' 19 | variable_print_preset: 'Normal' 20 | variable_printer_preset: 'Ender' 21 | variable_printer_model: 'Ender 3' 22 | variable_printer_technology: 'FDM' 23 | variable_print_resolution: 0.0125 24 | variable_slicer_resolution: 0.1 25 | variable_model_precision: 0.0001 26 | variable_layer_height: 0.2 27 | variable_vary_layer_height: True 28 | variable_layer_count: 0 29 | variable_perimeter_generator: 'Classic' 30 | variable_perimeters: 3 31 | variable_top_solid_layers: 3 32 | variable_bottom_solid_layers: 3 33 | variable_ironing: False 34 | variable_infill_dense: 50 35 | variable_infill_dense_algo: 'Gyroid' 36 | variable_infill_only_where_needed: False 37 | variable_brim_width: 0 38 | variable_brim_ears: False 39 | variable_support_material: False 40 | variable_support_material_auto: False 41 | variable_support_material_buildplate_only: True 42 | variable_skirts: 0 43 | variable_skirt_width: 0 44 | variable_skirt_height: 0 45 | variable_bounding_box_x_min: 0 46 | variable_bounding_box_x_max: 0 47 | variable_bounding_box_y_min: 0 48 | variable_bounding_box_y_max: 0 49 | variable_bounding_box_z_min: 0 50 | variable_bounding_box_z_max: 0 51 | variable_first_layer_x_min: 0 52 | variable_first_layer_y_min: 0 53 | variable_first_layer_x_max: 0 54 | variable_first_layer_y_max: 0 55 | variable_first_layer_print_size: 0 56 | variable_gcode_flavor: 'Klipper' 57 | variable_notes: '' 58 | variable_printer_notes: '' 59 | variable_filament_notes: '' 60 | variable_timestamp: '' 61 | variable_slicer_version: 0 62 | gcode: 63 | RESPOND MSG="Print Data:" 64 | #TODO Spit out all the values in the console 65 | -------------------------------------------------------------------------------- /dev/reddit_help.cfg: -------------------------------------------------------------------------------- 1 | [pause_resume] 2 | 3 | [gcode_macro M0] 4 | gcode: PAUSE 5 | 6 | [gcode_macro FS1] 7 | gcode: QUERY_FILAMENT_SENSOR SENSOR=RUNOUT_SWITCH 8 | 9 | [filament_switch_sensor RUNOUT_SWITCH] 10 | switch_pin: PG5 11 | pause_on_runout: False # Don't PAUSE, we have a macro 12 | runout_gcode: 13 | FILAMENT_RUNOUT 14 | insert_gcode: 15 | FILAMENT_INSERT 16 | 17 | [gcode_macro FILAMENT_RUNOUT] 18 | description: Filament runout macro 19 | gcode: 20 | G91 21 | G1 Z20 F900 # Raise Z away from print 22 | G90 23 | G1 X2 Y2 F5000 # Move to purge area 24 | G91 25 | {% if printer.extruder.can_extrude == False %} # verify extruder is hot enough 26 | RESPOND TYPE=error MSG="Below minimum temp. Heating extruder..." 27 | M109 S{printer.configfile.config.extruder.min_extrude_temp|int} # heat up to min_extrude_temp 28 | {% endif %} 29 | G1 E-50 F600 # Retract 50mm of filament 30 | G90 31 | 32 | [gcode_macro FILAMENT_INSERT] 33 | description: Filament inserted macro 34 | gcode: 35 | {% if printer.extruder.can_extrude == False %} # verify extruder is hot enough 36 | RESPOND TYPE=error MSG="Below minimum temp. Heating extruder..." 37 | M109 S{printer.configfile.config.extruder.min_extrude_temp|int} # heat up to min_extrude_temp 38 | {% endif %} 39 | G4 P30000 # Pause for 30 seconds 40 | G1 E50 F400 # Prime the nozzle -------------------------------------------------------------------------------- /dev/shutdowner.cfg: -------------------------------------------------------------------------------- 1 | # Shutdown Scheduler 2 | 3 | [gcode_shell_command kill_host] 4 | command: sh ~/printer_data/config/shutdown.sh 5 | 6 | [gcode_macro SCHEDULE_SHUTDOWN] 7 | description: Schedule shutdown for after print completes 8 | variable_do_shutdown: 0 9 | gcode: 10 | SET_GCODE_VARIABLE MACRO=SCHEDULE_SHUTDOWN VARIABLE=do_shutdown VALUE=1 11 | 12 | [gcode_macro CANCEL_SHUTDOWN] 13 | description: Cancel scheduled shutdown 14 | gcode: 15 | SET_GCODE_VARIABLE MACRO=SCHEDULE_SHUTDOWN VARIABLE=do_shutdown VALUE=1 16 | 17 | [gcode_macro END_PRINT] 18 | {% set X_MAX = printer.toolhead.axis_maximum.x|default(100)|float %} 19 | {% set Y_MAX = printer.toolhead.axis_maximum.y|default(100)|float %} 20 | 21 | #Fix-up extruder 22 | G91 23 | G1 E-2 F2700 24 | G1 E-1.5 Z0.2 F2400 25 | G1 X5 Y5 F6000 26 | G1 Z10 27 | G90 28 | 29 | #Present print 30 | G1 Z{printer.toolhead.position.z + 10} F600 31 | G1 X{X_MAX / 2} Y{Y_MAX} F6000 32 | M106 S0 33 | M104 S0 34 | M140 S0 35 | M109 S60 36 | #Disable Steppers 37 | M84 X Y E 38 | {% set scheduled_shutdown = printer["gcode_macro SCHEDULE_SHUTDOWN"].do_shutdown %} 39 | {% if scheduled_shutdown == 1 %} 40 | RUN_SHELL_COMMAND CMD=kill_host 41 | {% endif %} 42 | 43 | # ~/printer_data/config/shutdown.sh file: 44 | # 45 | # #!/bin/bash 46 | # 47 | # sleep 30 48 | # shutdown now -------------------------------------------------------------------------------- /extras/BED_PREP.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Bed Preparation # 3 | # Version 1.1 2023-2-12 # 4 | ##################################### 5 | 6 | # This macro performs homing, z_tilt, 7 | # and meshing for a docking probe. 8 | 9 | ################################ 10 | ########### BED_PREP ########### 11 | ################################ 12 | [gcode_macro BED_PREP] 13 | variable_output: 118 14 | gcode: 15 | {% if params.TARGET is defined %} 16 | {% set TARGET = params.TARGET|default(100)|float %} 17 | M{output} {"Heating bed to %.1f" % TARGET} 18 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={TARGET} 19 | TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={TARGET} MAXIMUM={TARGET+1} 20 | {% endif %} 21 | M{output} Homing Z 22 | G28 Z PROBE_LOCK ; home Z axis 23 | M{output} Calibrating Z 24 | STATUS_CALIBRATING_Z 25 | Z_TILT_ADJUST ; adjust z-tilt 26 | M{output} Meshing print area 27 | BED_MESH_CALIBRATE 28 | {% if params.TARGET is defined %} 29 | {% if params.HOLD is not defined %} 30 | M{output} Cooling bed 31 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 32 | {% else %} 33 | {% set HOLD = params.HOLD|default('false')|lower %} 34 | {% if HOLD == 'true' %} 35 | M{output} {"Leaving bed at %.1f" % TARGET} 36 | {% else %} 37 | M{output} Cooling bed 38 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 39 | {% endif %} 40 | {% endif %} 41 | {% else %} 42 | {% if params.HOLD is defined %} 43 | {% set HOLD = params.HOLD|default('false')|lower %} 44 | {% if HOLD == 'true' %} 45 | M{output} No target to hold 46 | {% endif %} 47 | {% endif %} 48 | {% endif %} 49 | M{output} Docking Probe 50 | Dock_Probe_Unlock ; dock probe 51 | M{output} Ready -------------------------------------------------------------------------------- /extras/CANBOOT_ebb toolboard_canbus.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/CANBOOT_ebb toolboard_canbus.bin -------------------------------------------------------------------------------- /extras/CANBOOT_ebb2209_canbus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/CANBOOT_ebb2209_canbus.png -------------------------------------------------------------------------------- /extras/CANBOOT_ebb_toolboard_canbus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/CANBOOT_ebb_toolboard_canbus.png -------------------------------------------------------------------------------- /extras/CANBOOT_octopus_canbridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/CANBOOT_octopus_canbridge.png -------------------------------------------------------------------------------- /extras/CLEAN_NOZZLE.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Nozzle Clean Macro # 3 | # Version 1.5 2023-1-31 # 4 | ##################################### 5 | 6 | ################################ 7 | ######### CLEAN_NOZZLE ######### 8 | ################################ 9 | [gcode_macro CLEAN_NOZZLE] 10 | variable_start_x: -19 11 | variable_start_y: -5 12 | variable_start_z: 0 13 | variable_wipe_axis: 'X' 14 | variable_wipe_dist: 15 15 | variable_wipe_qty: 10 16 | variable_wipe_spd: 250 17 | variable_raise_distance: 5 18 | variable_extruder_name: 'extruder' 19 | variable_extruder_temp: 180 20 | variable_output: 118 21 | variable_pre_hot: True 22 | variable_led_status: False 23 | variable_status_heat: 'STATUS_HEATING' 24 | variable_status_clean: 'STATUS_CLEANING' 25 | variable_ready_status: 'STATUS_READY' 26 | gcode: 27 | HOME_IF_NEEDED 28 | {% set nozzle_targ = params.TARGET|default(0)|float %} 29 | {% set is_hot = params.HOT|default(pre_hot|string) %} 30 | {% if is_hot|lower == "false" %} 31 | {% if led_status == True %} 32 | {status_heat} 33 | {% endif %} 34 | M{output} Heating extruder.. 35 | {% if nozzle_targ > 0 %} 36 | SET_HEATER_TEMPERATURE HEATER={extruder_name} TARGET={nozzle_targ} 37 | TEMPERATURE_WAIT SENSOR={extruder_name} MINIMUM={nozzle_targ} 38 | {% elif extruder_temp > 0 %} 39 | SET_HEATER_TEMPERATURE HEATER={extruder_name} TARGET={extruder_temp} 40 | TEMPERATURE_WAIT SENSOR={extruder_name} MINIMUM={extruder_temp} 41 | {% endif %} 42 | {% endif %} 43 | G90 ; absolute positioning 44 | ## Move nozzle to start position 45 | G1 X{start_x} Y{start_y} F6000 46 | G1 Z{start_z} F1500 47 | # Set lighting 48 | {% if led_status == True %} 49 | {status_clean} 50 | {% endif %} 51 | ## Wipe nozzle 52 | M{output} Wiping nozzle.. 53 | {% for wipes in range(1, (wipe_qty + 1)) %} 54 | {% if wipe_axis|lower == 'x' %} 55 | G1 X{start_x + wipe_dist} F{wipe_spd * 60} 56 | G1 X{start_x} F{wipe_spd * 60} 57 | {% elif wipe_axis|lower == 'y' %} 58 | G1 Y{start_y + wipe_dist} F{wipe_spd * 60} 59 | G1 Y{start_y} F{wipe_spd * 60} 60 | {% else %} 61 | M{output} INVALID WIPE AXIS CONFIGURATION 62 | {% endif %} 63 | {% endfor %} 64 | ## Raise nozzle 65 | G1 Z{raise_distance} 66 | {% if is_hot|lower == "false" %} 67 | M{output} Cooling extruder.. 68 | SET_HEATER_TEMPERATURE HEATER={extruder_name} TARGET=0 69 | {% endif %} 70 | # Set lighting 71 | {% if led_status == True %} 72 | {status_ready} 73 | {% endif %} -------------------------------------------------------------------------------- /extras/DELAYED_CODER.cfg: -------------------------------------------------------------------------------- 1 | [delayed_gcode pinger] 2 | gcode: 3 | M118 Ping! 4 | 5 | [gcode_macro _DELAYED_CODER] 6 | gcode: 7 | UPDATE_DELAYED_GCODE ID=pinger DURATION=2 8 | M190 S70 9 | M190 S0 -------------------------------------------------------------------------------- /extras/DO_VARIABLES.cfg: -------------------------------------------------------------------------------- 1 | # Gcode variables 2 | 3 | [gcode_macro ADD_VARIABLE] 4 | gcode: 5 | {% set MY_VARIABLE = printer["gcode_macro gcode_variables"].my_variable %} 6 | {% set NEW_VARIABLE = MY_VARIABLE + 1 %} 7 | SET_GCODE_VARIABLE MACRO=gcode_variables VARIABLE=my_variable VALUE={NEW_VARIABLE} 8 | 9 | [gcode_macro GCODE_VARIABLES] 10 | variable_my_variable: 0 11 | gcode: 12 | {% set MY_VARIABLE = printer["gcode_macro gcode_variables"].my_variable %} 13 | M118 {MY_VARIABLE} -------------------------------------------------------------------------------- /extras/GET_GAS.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro GET_GAS] 2 | gcode: 3 | {% set sensor = printer["bme280 chamber"] %} 4 | M118 {sensor.gas} -------------------------------------------------------------------------------- /extras/KLIPPER_ebb toolboard_canbus.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/KLIPPER_ebb toolboard_canbus.bin -------------------------------------------------------------------------------- /extras/KLIPPER_ebb2209_canbus_canboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/KLIPPER_ebb2209_canbus_canboot.png -------------------------------------------------------------------------------- /extras/KLIPPER_ebb_toolboard_canbus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/KLIPPER_ebb_toolboard_canbus.png -------------------------------------------------------------------------------- /extras/KLIPPER_ebb_toolboard_canbus_no-canboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/KLIPPER_ebb_toolboard_canbus_no-canboot.png -------------------------------------------------------------------------------- /extras/KLIPPER_octopus_canbridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/KLIPPER_octopus_canbridge.png -------------------------------------------------------------------------------- /extras/MESH_CHECK.cfg: -------------------------------------------------------------------------------- 1 | ################################ 2 | ######### MESH_CHECK ########### 3 | ################################ 4 | 5 | [gcode_macro MESH_CHECK] 6 | description: Checks if a mesh exists to determine whether to create a new one 7 | gcode: 8 | {% if printer.bed_mesh.profiles['default'] is defined %} 9 | BED_MESH_PROFILE LOAD='default' ; load mesh 10 | {% else %} 11 | BED_MESH_CALIBRATE ; generate new mesh 12 | {% endif %} -------------------------------------------------------------------------------- /extras/REBOOT_HOST.cfg: -------------------------------------------------------------------------------- 1 | # Requires gcode_shell_command: 2 | # https://github.com/th33xitus/kiauh/blob/master/docs/gcode_shell_command.md 3 | # The extension can be installed with KIAUH 4 | 5 | [respond] 6 | 7 | [gcode_shell_command reboot_host] 8 | command: reboot now 9 | 10 | [gcode_macro REBOOT_HOST] 11 | description: Reboots the host system 12 | gcode: 13 | {% if printer.idle_timeout.state == "Printing" %} 14 | # Don't allow reboot during print. 15 | RESPOND TYPE=error MSG="This command cannot be used while printing" 16 | {% else %} 17 | RUN_SHELL_COMMAND CMD=shutdown_host 18 | {% endif %} -------------------------------------------------------------------------------- /extras/REBUILD_MESH.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro REBUILD_MESH] 2 | gcode: 3 | {% set svv = printer.save_variables.variables %} 4 | M117 Print job {svv.print_count} 5 | # home all 6 | G28 7 | SAVE_VARIABLE VARIABLE=print_count VALUE={svv.print_count + 1} 8 | {% if svv.print_count % 10 == 0 %} 9 | M117 Rebuilding mesh 10 | G29 11 | {% endif %} -------------------------------------------------------------------------------- /extras/SET_RETRACT_DISTANCE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro SET_RETRACT_DISTANCE] 2 | variable_current_filament_type: '' 3 | variable_retraction_distance: 0 4 | variable_last_filament_type: 'PLA' 5 | variable_last_retract_dist: 0.5 6 | gcode: 7 | {% set current_filament_type = params.MATERIAL_TYPE|default("PLA")|string %} 8 | {% set last_filament_type = printer.save_variables.variables.last_filament_type %} 9 | {% set last_retract_dist = printer.save_variables.variables.last_retract_dist|default(0.5) %} 10 | {% set retraction_distance = params.RETRACTION_DISTANCE|default(last_retract_dist)|float %} 11 | {% if current_filament_type != last_filament_type %} 12 | {% if "PLA+" in current_filament_type %} 13 | {% set retraction_distance = 0.7 %} 14 | M118 "PLA+: 0.6" 15 | SET_RETRACTION RETRACT_LENGTH={retraction_distance} 16 | {% elif "PLA" in current_filament_type %} 17 | {% set retraction_distance = 0.6 %} 18 | M118 "PLA: 0.6" 19 | SET_RETRACTION RETRACT_LENGTH={retraction_distance} 20 | {% elif "PETG" in current_filament_type %} 21 | {% set retraction_distance = 0.3 %} 22 | M118 "PETG: 0.3" 23 | SET_RETRACTION RETRACT_LENGTH={retraction_distance} 24 | {% elif "ASA" in current_filament_type %} 25 | {% set retraction_distance = 0.4 %} 26 | M118 "ASA: 0.4" 27 | SET_RETRACTION RETRACT_LENGTH={retraction_distance} 28 | {% elif "TPU" in current_filament_type %} 29 | {% set retraction_distance = 0.75 %} 30 | M118 "TPU: 0.75" 31 | SET_RETRACTION RETRACT_LENGTH={retraction_distance} 32 | {% else %} 33 | M118 "{current_filament_type} is an unrecognized filament type, please add to macro." 34 | {% set invalid_fil = True %} 35 | {% endif %} 36 | {% if not invalid_fil %} 37 | SET_GCODE_VARIABLE MACRO=SET_RETRACT_DISTANCE VARIABLE=last_filament_type VALUE='"{current_filament_type}"' 38 | SAVE_VARIABLE VARIABLE=last_filament_type VALUE='"{current_filament_type}"' 39 | SET_GCODE_VARIABLE MACRO=SET_RETRACT_DISTANCE VARIABLE=last_retract_dist VALUE={retraction_distance} 40 | SAVE_VARIABLE VARIABLE=last_retract_dist VALUE={retraction_distance} 41 | {% endif %} 42 | {% else %} 43 | M118 "No Retraction adjustment necessary" 44 | SET_RETRACTION RETRACT_LENGTH={retraction_distance} 45 | {% endif %} 46 | -------------------------------------------------------------------------------- /extras/TEST_START-deltchar.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TEST_START] 2 | variable_var: { 'temp' : {'bed': 110, 'extruder': 165}, 3 | 'abm' : {'area_start': (0,0), 'area_end': (0,0)}, 4 | 'time' : {'soak': 20, 'extra': 5}, 5 | 'z_adjust' : 0.0, 6 | 'redo_qgl' : True 7 | } 8 | gcode: 9 | {% set bed = params.BED|default(115)|float|round(1) %} 10 | {% set extruder = params.EXTRUDER|default(165)|float|round(1) %} 11 | {% set area_start = params.AREA_START %} 12 | {% set area_end = params.AREA_END %} 13 | {% set soak = params.SOAK %} 14 | {% set redo_qgl = var.redo_qgl %} 15 | TEST_VAR VBED={bed} VEXT={extruder} SOAK={soak} CQGL={redo_qgl} 16 | # ADAPTIVE_BMC AREA_START={area_start} AREA_END={area_end} 17 | 18 | 19 | 20 | [gcode_macro TEST_VAR] 21 | gcode: 22 | {action_respond_info( "Entering the TEST_VAR Marco" )} 23 | {action_respond_info("Parameters: %s" % rawparams )} 24 | {% set bed = params.VBED|float %} 25 | {% set extruder = params.VEXT|float %} 26 | {% set soak = (( params.SOAK|int ) * 60 * 1000) %} 27 | {% set cqgl = params.CQGL %} 28 | {action_respond_info("Bed Temperature in TEST_VAR: %.2f" % bed|float )} 29 | {action_respond_info("Extruder Temperature in TEST_VAR: %.2f" % extruder|float )} 30 | {action_respond_info("SOAK time (ms): %d" % soak|int )} 31 | {action_respond_info("Redo QGL: %s" % CQGL )} -------------------------------------------------------------------------------- /extras/caselight.cfg: -------------------------------------------------------------------------------- 1 | [output_pin caselight] 2 | pin: ar5 3 | pwm: true 4 | hardware_pwm: true 5 | cycle_time: 0.001 6 | value: 0.1 -------------------------------------------------------------------------------- /extras/clean_backups/README.md: -------------------------------------------------------------------------------- 1 | # Clean Backup Files 2 | 3 | This script will clean all those `printer-####.cfg` files that clutter up the main config directory by moving them to an archive directory during klipper startup. 4 | 5 | # Contents 6 | 7 | - [Clean Backup Files](#clean-backup-files) 8 | - [Contents](#contents) 9 | - [Installation](#installation) 10 | - [Setup](#setup) 11 | - [Changelog](#changelog) 12 | - [v1.2.5.5 2023-03-15](#v1255-2023-03-15) 13 | - [v1.2.5 2023-02-17](#v125-2023-02-17) 14 | - [v1.2.0 2023-02-15](#v120-2023-02-15) 15 | - [v1.1.0 2023-02-15](#v110-2023-02-15) 16 | - [v1.0.0 2023-02-14](#v100-2023-02-14) 17 | 18 | # Installation 19 | 20 | Download the following files: 21 | 22 | - [clean_backups.cfg](clean_backups.cfg) 23 | 24 | - [clean_backups.sh](clean_backups.sh) 25 | 26 | - [move_files.sh](move_files.sh) 27 | 28 | Place the downloaded files in your main config directory: 29 | 30 | /home/pi/printer_data/config/clean_backups.cfg 31 | /home/pi/printer_data/config/clean_backups.sh 32 | /home/pi/printer_data/config/move_files.sh 33 | 34 | Add the following line near the top of your `printer.cfg` file: 35 | 36 | [include clean_backups.cfg] 37 | 38 | Make the move_files.sh script executable: 39 | 40 | From SSH, run the following: 41 | 42 | chmod +x /home/pi/printer_data/config/move_files.sh 43 | 44 | You may need to adjust that path if your config files are not stored in `/home/pi/printer_data/config`. 45 | 46 | # Setup 47 | 48 | If your main config directory is `/home/pi/printer_data/config` you don't need to do anything else. The script should run when Klipper starts and move any backup files to the `archive` directory. 49 | 50 | If your main config path is different, you will need to modify some lines: 51 | 52 | Change any instances of `/home/pi/printer_data/config` to the path you are using. These will be found both in [clean_backups.cfg](clean_backups.cfg) and [clean_backups.sh](clean_backups.sh) 53 | 54 | After making those changes the script should then work as expected. 55 | 56 | # Changelog 57 | 58 | ## v1.2.5.5 2023-03-15 59 | 60 | - Roll back regex pattern. 61 | 62 | ## v1.2.5 2023-02-17 63 | 64 | - Use a better (more specific) regex pattern to match the backup files. 65 | 66 | ## v1.2.0 2023-02-15 67 | 68 | - Fixed a bug where already-moved files would try to move again to the same directory. 69 | 70 | ## v1.1.0 2023-02-15 71 | 72 | - Simplify the scripts to just run from the main config directory instead of using a scripts directory. 73 | - Create the destination directory if it doesn't exist 74 | 75 | ## v1.0.0 2023-02-14 76 | 77 | - Initial Release -------------------------------------------------------------------------------- /extras/clean_backups/clean_backups.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Clean Backups # 3 | # Version 1.2.5.5 2023-03-15 # 4 | ##################################### 5 | 6 | # This script cleans backup files 7 | # from the base folder by moving them 8 | # to an archive folder. 9 | 10 | [delayed_gcode clean_backups] 11 | initial_duration: 2 12 | gcode: 13 | RUN_SHELL_COMMAND CMD=backup_cleaner 14 | 15 | [gcode_shell_command backup_cleaner] 16 | command: sh /home/pi/printer_data/config/clean_backups.sh 17 | timeout: 60. 18 | verbose: True -------------------------------------------------------------------------------- /extras/clean_backups/clean_backups.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2023 Chris Laprade (chris@rootiest.com) 3 | # 4 | # This file is part of config. 5 | # 6 | # config is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # config is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with config. If not, see . 18 | 19 | /home/pi/printer_data/config/move_files.sh /home/pi/printer_data/config/ /home/pi/printer_data/config/archive/ "/home/pi/printer_data/config/printer-*.cfg" -------------------------------------------------------------------------------- /extras/clean_backups/move_files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2023 Chris Laprade (chris@rootiest.com) 3 | # 4 | # This file is part of config. 5 | # 6 | # config is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # config is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with config. If not, see . 18 | 19 | 20 | # Display help information 21 | function display_help() { 22 | echo "Usage: $0 " 23 | echo "" 24 | echo "Description:" 25 | echo " This script searches for files in the source folder whose filename matches the regex string." 26 | echo " It then moves all matching files to the destination folder and provides a summary." 27 | echo "" 28 | echo "Parameters:" 29 | echo " The folder to search for files." 30 | echo " The folder to move matching files to." 31 | echo " The regex string to match against file names." 32 | } 33 | 34 | # Validate parameters 35 | if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then 36 | display_help 37 | exit 0 38 | fi 39 | 40 | if [ $# -lt 3 ]; then 41 | echo "Error: Not enough parameters provided." 42 | display_help 43 | exit 1 44 | fi 45 | 46 | if [ ! -d "$1" ]; then 47 | echo "Error: Source folder does not exist." 48 | display_help 49 | exit 1 50 | fi 51 | 52 | if [ ! -d "$2" ]; then 53 | echo "Destination folder does not exist. Creating destination folder..." 54 | mkdir -p "$2" 55 | fi 56 | 57 | # Search for and move files 58 | matching_files=$(find "$1" -type f -wholename "$3") 59 | if [ -z "$matching_files" ]; then 60 | echo "No files matching the regex were found in the source folder." 61 | exit 0 62 | fi 63 | 64 | for file in $matching_files; do 65 | mv "$file" "$2" 66 | done 67 | 68 | # Provide summary 69 | num_files=$(echo "$matching_files" | wc -w) 70 | echo "Moved $num_files file(s) from $1 to $2." 71 | -------------------------------------------------------------------------------- /extras/delayed_printer_off.cfg: -------------------------------------------------------------------------------- 1 | [delayed_gcode delayed_printer_off] 2 | initial_duration: 900 3 | gcode: 4 | {% if printer.idle_timeout.state == "Idle" %} 5 | _POWER_SAVE 6 | {% endif %} 7 | 8 | [delayed_gcode shutdown_machine] 9 | gcode: 10 | M117 Shutdown 11 | {action_call_remote_method("shutdown_machine")} 12 | initial_duration: 0.0 13 | 14 | [idle_timeout] 15 | gcode: 16 | M84 17 | TURN_OFF_HEATERS 18 | UPDATE_DELAYED_GCODE ID=delayed_printer_off DURATION=60 -------------------------------------------------------------------------------- /extras/fan_rules.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M106] 2 | rename_existing: M106.0 3 | gcode: 4 | # params.S == Fan speed ranges from 0 to 255 5 | {% if params.S == 255 %} ; 100% fan speed 6 | # SET_FAN SPEED controls generic_fans 7 | # SPEED ranges from 0.00 to 1.00 8 | SET_FAN_BASE FAN=blower_fan SPEED=0.50 ; 50% generic_fan speed 9 | {% elif params.S > 127 %} ; 50% or higher fan speed 10 | SET_FAN_BASE FAN=blower_fan SPEED=0.10 ; 10% generic_fan speed 11 | {% else %} 12 | {% set prev_speed = printer["gcode_macro SET_FAN_SPEED"].prev_speed %} 13 | SET_FAN_BASE FAN=blower_fan SPEED={prev_speed} ; generic_fan to previous speed 14 | {% endif %} 15 | # Run the original/normal fan control command 16 | M106.0 {rawparams} 17 | 18 | [gcode_macro SET_FAN_SPEED] 19 | rename_existing: SET_FAN_BASE 20 | variable_prev_speed: 0 21 | gcode: 22 | SET_GCODE_VARIABLE MACRO=SET_FAN_SPEED VARIABLE=prev_speed VALUE={params.SPEED} 23 | SET_FAN_BASE {rawparams} 24 | 25 | [gcode_macro SCHEDULE_SHUTDOWN] 26 | variable_do_shutdown: 0 27 | gcode: 28 | SET_GCODE_VARIABLE MACRO=SCHEDULE_SHUTDOWN VARIABLE=do_shutdown VALUE=1 29 | 30 | [gcode_macro CANCEL_SHUTDOWN] 31 | gcode: 32 | SET_GCODE_VARIABLE MACRO=SCHEDULE_SHUTDOWN VARIABLE=do_shutdown VALUE=0 33 | 34 | [gcode_macro END_PRINT] 35 | gcode: 36 | # Other stuff 37 | {% set do_shutdown = printer["gcode_macro SCHEDULE_SHUTDOWN"].do_shutdown %} 38 | {% if do_shutdown == 1 %} 39 | RUN_SHELL_COMMAND CMD=kill_host 40 | {% endif %} -------------------------------------------------------------------------------- /extras/filament_switch_runout.cfg: -------------------------------------------------------------------------------- 1 | # Need this to send console messages 2 | [respond] 3 | 4 | [filament_switch_sensor runout_sensor] 5 | pause_on_runout: False # This needs to be false to use runout_gcode 6 | runout_gcode: 7 | _filament_runout 8 | insert_gcode: 9 | _filament_insert 10 | switch_pin:P1.26 11 | 12 | [gcode_macro _filament_runout] 13 | gcode: 14 | SET_IDLE_TIMEOUT TIMEOUT=10800 # Set idle_timeout to 3hrs 15 | #M104 S0 # turn off the hotend 16 | #SAVE_GCODE_STATE is not required as PAUSE does this automatically 17 | # See here: https://www.klipper3d.org/G-Codes.html#pause 18 | BASE_PAUSE 19 | G91 # Relative positioning 20 | G1 E-10 F2100 # Retract 10mm of filament 21 | G1 Z10 # Move Z up 10mm from current position 22 | G90 # Absolute positioning 23 | G1 X350 Y350 F6000 # Park at the coordinates you said you wanted 24 | M106 S0 # Disable the part cooling fan 25 | UPDATE_DELAYED_GCODE ID=runout_wait DURATION=300 26 | 27 | [delayed_gcode runout_wait] 28 | gcode: 29 | # Honestly you probably shouldn't keep the hotend heated for 5 minutes as it's 30 | # definitely going to leak a bunch of filament during that time, but anyway 31 | M104 S0 # turn off the hotend 32 | 33 | [gcode_macro _filament_insert] 34 | gcode: 35 | # Get the extruder min_extrude_temp (will be 150 if not defined) 36 | {% set TARGET = printer.configfile.config.extruder.min_extrude_temp|float %} 37 | # Get the current extruder temp 38 | {% set TEMP = printer.extruder.temperature|float %} 39 | {% if TEMP < TARGET %} 40 | RESPOND TYPE=error MSG="Please heat the extruder before continuing." 41 | {% else %} 42 | RESPOND TYPE=error MSG="Press RESUME to continue." 43 | {% endif %} 44 | SET_IDLE_TIMEOUT TIMEOUT=900 # Set idle_timeout to 15 minutes 45 | 46 | 47 | # Use this macro to heat the extruder and then resume like so: 48 | # 49 | # HEAT_AND_RESUME TARGET=220 50 | # 51 | [gcode_macro HEAT_AND_RESUME] 52 | description: Heat the extruder and resume print when target is reached 53 | gcode: 54 | # Get the extruder min_extrude_temp (will be 150 if not defined) 55 | {% set min_target = printer.configfile.config.extruder.min_extrude_temp|float %} 56 | # Get the target from params or set it to min_target if none is given 57 | {% set TARGET = params.TARGET|default(min_target)|float %} 58 | # Heat the extruder and wait for the target to be reached 59 | M109 S{TARGET} 60 | # Notify that print is resuming 61 | RESPOND TYPE=error MSG="Temperature reached. Resuming print." 62 | # Resume print when target is reached 63 | # This will automatically restore to the pre-PAUSE position 64 | # See here: https://www.klipper3d.org/G-Codes.html#resume 65 | RESUME -------------------------------------------------------------------------------- /extras/fix_scripts/fix_scripts.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Fix ZippyPrint Scripts # 3 | # Version 1.0.5 2023-3-28 # 4 | ##################################### 5 | ##### PLEASE READ BELOW ##### 6 | ##################################### 7 | # This macro will fix permissions on 8 | # all scripts in your config 9 | # 10 | # 11 | # You must have gcode_shell_command 12 | # installed to use this macro/script. 13 | # 14 | ############## NOTE: ################ 15 | # This will make all .sh and .py 16 | # files execuable in your config! 17 | # Please use caution if you do not 18 | # trust all scripts in your config 19 | 20 | ################################ 21 | ######### FIX_SCRIPTS ########## 22 | ################################ 23 | 24 | [gcode_macro FIX_SCRIPTS] 25 | gcode: 26 | RUN_SHELL_COMMAND CMD=fix_scripts 27 | 28 | [gcode_shell_command fix_scripts] 29 | command: bash /home/pi/printer_data/config/scripts/fix_scripts.sh /home/pi/printer_data/config 30 | timeout: 60. 31 | verbose: True -------------------------------------------------------------------------------- /extras/fix_scripts/fix_scripts.sh: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 Chris Laprade 2 | # 3 | # This file is part of zippy_config. 4 | # 5 | # zippy_config is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # zippy_config is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with zippy_config. If not, see . 17 | 18 | # Copyright (C) 2023 Chris Laprade (chris@rootiest.com) 19 | # 20 | # This file is part of zippy_print. 21 | # 22 | # zippy_print is free software: you can redistribute it and/or modify 23 | # it under the terms of the GNU General Public License as published by 24 | # the Free Software Foundation, either version 3 of the License, or 25 | # (at your option) any later version. 26 | # 27 | # zippy_print is distributed in the hope that it will be useful, 28 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | # GNU General Public License for more details. 31 | # 32 | # You should have received a copy of the GNU General Public License 33 | # along with zippy_print. If not, see . 34 | 35 | #!/bin/bash 36 | 37 | # Help function 38 | function show_help { 39 | echo "Usage: $0 [directory_path]" 40 | echo "Make every .sh and .py file executable in the specified directory and its subdirectories." 41 | exit 1 42 | } 43 | 44 | # Check if the correct number of arguments is passed 45 | if [[ $# -ne 1 ]]; then 46 | show_help 47 | fi 48 | 49 | # Check if the specified directory exists 50 | if [[ ! -d $1 ]]; then 51 | echo "Error: Directory not found" 52 | show_help 53 | fi 54 | 55 | # Count the number of .sh and .py files in the specified directory and its subdirectories 56 | sh_count=$(find "$1" -type f -name "*.sh" | wc -l) # Count the number of .sh files 57 | py_count=$(find "$1" -type f -name "*.py" | wc -l) # Count the number of .py files 58 | total_count=$((sh_count + py_count)) # Add the counts together to get the total count 59 | 60 | # Make every .sh and .py file executable 61 | find "$1" -type f \( -name "*.sh" -o -name "*.py" \) -print0 | while read -d $'\0' file # Find all .sh and .py files and loop through them 62 | do 63 | if [[ ! -x $file ]]; then # Check if the file is not executable 64 | chmod -v +x "$file" # Make the file executable and print a message 65 | fi 66 | done 67 | 68 | # Output summary statistics 69 | echo "Modified permissions for $total_count files ($sh_count .sh files and $py_count .py files) in directory $1 and its subdirectories." 70 | -------------------------------------------------------------------------------- /extras/fluidd.cfg: -------------------------------------------------------------------------------- 1 | [virtual_sdcard] 2 | path: ~/printer_data/gcodes 3 | 4 | [pause_resume] 5 | 6 | [display_status] 7 | 8 | [gcode_macro CANCEL_PRINT] 9 | description: Cancel the actual running print 10 | rename_existing: CANCEL_PRINT_BASE 11 | gcode: 12 | TURN_OFF_HEATERS 13 | CANCEL_PRINT_BASE 14 | 15 | [gcode_macro PAUSE] 16 | description: Pause the actual running print 17 | rename_existing: PAUSE_BASE 18 | # change this if you need more or less extrusion 19 | variable_extrude: 1.0 20 | gcode: 21 | ##### read E from pause macro ##### 22 | {% set E = printer["gcode_macro PAUSE"].extrude|float %} 23 | ##### set park positon for x and y ##### 24 | # default is your max posion from your printer.cfg 25 | {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} 26 | {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} 27 | ##### calculate save lift position ##### 28 | {% set max_z = printer.toolhead.axis_maximum.z|float %} 29 | {% set act_z = printer.toolhead.position.z|float %} 30 | {% if act_z < (max_z - 2.0) %} 31 | {% set z_safe = 2.0 %} 32 | {% else %} 33 | {% set z_safe = max_z - act_z %} 34 | {% endif %} 35 | ##### end of definitions ##### 36 | PAUSE_BASE 37 | G91 38 | {% if printer.extruder.can_extrude|lower == 'true' %} 39 | G1 E-{E} F2100 40 | {% else %} 41 | {action_respond_info("Extruder not hot enough")} 42 | {% endif %} 43 | {% if "xyz" in printer.toolhead.homed_axes %} 44 | G1 Z{z_safe} F900 45 | G90 46 | G1 X{x_park} Y{y_park} F6000 47 | {% else %} 48 | {action_respond_info("Printer not homed")} 49 | {% endif %} 50 | 51 | [gcode_macro RESUME] 52 | description: Resume the actual running print 53 | rename_existing: RESUME_BASE 54 | gcode: 55 | ##### read E from pause macro ##### 56 | {% set E = printer["gcode_macro PAUSE"].extrude|float %} 57 | #### get VELOCITY parameter if specified #### 58 | {% if 'VELOCITY' in params|upper %} 59 | {% set get_params = ('VELOCITY=' + params.VELOCITY) %} 60 | {%else %} 61 | {% set get_params = "" %} 62 | {% endif %} 63 | ##### end of definitions ##### 64 | {% if printer.extruder.can_extrude|lower == 'true' %} 65 | G91 66 | G1 E{E} F2100 67 | {% else %} 68 | {action_respond_info("Extruder not hot enough")} 69 | {% endif %} 70 | RESUME_BASE {get_params} -------------------------------------------------------------------------------- /extras/led.cfg: -------------------------------------------------------------------------------- 1 | ######################## 2 | ###### NEOPIXEL ###### 3 | ######################## 4 | 5 | [neopixel my_neopixel] 6 | pin: P1.24 7 | chain_count: 44 8 | color_order: GRB 9 | initial_RED: 0.5 10 | initial_GREEN: 0.5 11 | initial_BLUE: 0.5 12 | 13 | 14 | 15 | 16 | 17 | [gcode_macro red] 18 | # turn on Red full brightness, turn off all other LED colours 19 | gcode: 20 | SET_LED LED=my_neopixel RED=1.0 GREEN=0.0 BLUE=0.0 TRANSMIT=1 21 | 22 | [gcode_macro green] 23 | # turn on Red full brightness, turn off all other LED colours 24 | gcode: 25 | SET_LED LED=my_neopixel RED=0.0 GREEN=1.0 BLUE=0.0 TRANSMIT=1 26 | 27 | [gcode_macro blue] 28 | # turn on Red full brightness, turn off all other LED colours 29 | gcode: 30 | SET_LED LED=my_neopixel RED=0.0 GREEN=.75 BLUE=1.0 TRANSMIT=1 31 | 32 | [gcode_macro white] 33 | # turn on Red full brightness, turn off all other LED colours 34 | gcode: 35 | SET_LED LED=my_neopixel RED=0.80 GREEN=0.80 BLUE=0.80 TRANSMIT=1 36 | 37 | [gcode_macro yellow] 38 | # turn on Red full brightness, turn off all other LED colours 39 | gcode: 40 | SET_LED LED=my_neopixel RED=1.0 GREEN=1.0 BLUE=0 TRANSMIT=1 41 | 42 | [gcode_macro ledoff] 43 | # turn on Red full brightness, turn off all other LED colours 44 | gcode: 45 | SET_LED LED=my_neopixel RED=0.0 GREEN=0.0 BLUE=0.0 TRANSMIT=1 46 | 47 | 48 | [gcode_macro flicker] 49 | gcode: 50 | {% set LEDTimes = [10, 20, 20, 240, 20, 40, 20, 100, 20, 20, 20, 260, 80, 20, 240, 60, 160, 20, 240, 20, 1000, 20, 20, 40, 100, 20, 274, 340, 860, 20, 1400, 20, 60, 20] %} 51 | {% set RGB_Red = 0.2 %} 52 | {% set RGB_Green = 0.2 %} 53 | {% set RGB_Blue = 0.2 %} 54 | {% set RGB_Strip = "my_neopixel" %} 55 | 56 | {% for toggletime in LEDTimes %} 57 | {% set ledTime = toggletime|string %} 58 | {% set loopCount = loop.index %} 59 | 60 | {% if loopCount is divisibleby 2 %} # If the loop index is divisible by 2 (firtst index is NOT so the LEd should turn ON) 61 | SET_LED LED={RGB_Strip} RED={RGB_Red} GREEN={RGB_Green} BLUE={RGB_Blue} 62 | G4 P{ledTime|int} 63 | {% else %} 64 | SET_LED LED={RGB_Strip} 65 | G4 P{ledTime|int} 66 | {% endif %} 67 | 68 | {% endfor %} 69 | 70 | {% for i in range(1,9) %} # loops 1,2,3,4,5 71 | {action_respond_info(i|string)} 72 | SET_LED LED={RGB_Strip} RED={RGB_Red+(i/10)} GREEN={RGB_Green+(i/10)} BLUE={RGB_Blue+(i/10)} INDEX=1 73 | G4 P200 74 | {% endfor %} 75 | -------------------------------------------------------------------------------- /extras/led_warmup.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro START_PRINT] 2 | ###come usare con cura per esempio: start_print B={material_bed_temperature_layer_0} H={material_print_temperature_layer_0} L={layer_height} S={speed_travel} 3 | default_parameter_B=70 4 | default_parameter_H=230 5 | default_parameter_L=0.2 6 | default_parameter_S=100 7 | gcode: 8 | # ... ##some operations... 9 | # ... 10 | # ... 11 | M117 Porto a Home X-Y... 12 | M118 Porto a Home X-Y... 13 | G28 X0 Y0 14 | G4 P1000 15 | #set_led_red 16 | M117 Riscaldo Piatto e estrusore... 17 | M118 Riscaldo Piatto e estrusore... 18 | M140 S{B} ; heat Bed senza attendere 19 | M104 S{H} 20 | G4 P1000 21 | 22 | 23 | check_temp 24 | 25 | 26 | #set_led_yellow 27 | M117 Attendo Temperatura BED ... 28 | M118 Attendo Temperatura BED ... 29 | #set_led_red 30 | M190 S{B} ###just for security we wait again..... 31 | M117 Attendo Temperatura HotEND ... 32 | M118 Attendo Temperatura HotEND ... 33 | #set_led_red 34 | M109 S{H} ###just for security we wait again..... 35 | #set_led_ciano 36 | # ... 37 | # ... some other operations... 38 | # ... 39 | 40 | 41 | [gcode_macro check_temp] 42 | gcode: 43 | {% set count = 1200 %} ### about 10 minutes count... 44 | {% for c in range(count) %} 45 | templedcolor_timer 46 | {% endfor %} 47 | 48 | # Temperature reactive Neopixel using extruder actual temp... 49 | [gcode_macro templedcolor_timer] 50 | gcode: 51 | {% if printer.extruder.target|int > 0 %} 52 | {% if printer.extruder.temperature < printer.extruder.target %} 53 | #M117 ciclico... 54 | #M118 ciclico... 55 | {% set rosso = (printer.extruder.temperature / printer.extruder.target)|round(2) %} 56 | {% set blu = (1-(printer.extruder.temperature / printer.extruder.target))|round(2) %} 57 | #M117 rosso={rosso} blu={blu } 58 | #M118 rosso={rosso} blu ={blu } 59 | SET_LED LED=neopixel RED={rosso} GREEN=0 BLUE={blu} 60 | G4 P500 61 | #{% else %} 62 | #M117 Fine ciclo... 63 | #M118 Fine ciclo... 64 | {% endif %} 65 | {% else %} 66 | m118 extrusore spento... 67 | {% endif %} 68 | -------------------------------------------------------------------------------- /extras/loadgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/loadgraph.png -------------------------------------------------------------------------------- /extras/mesh_toggler.cfg: -------------------------------------------------------------------------------- 1 | # This macro will toggle on/off creating a new mesh at the start of a print. 2 | 3 | [gcode_macro TOGGLE_MESH] 4 | description: Toggle creation of a pre-print mesh 5 | gcode: 6 | {% set svv = printer.save_variables.variables %} 7 | {% if svv.do_mesh != 1 %} 8 | SAVE_VARIABLE VARIABLE=do_mesh VALUE=1 9 | RESPOND type=error MSG="Pre-Print Mesh has been enabled." 10 | {% else %} 11 | SAVE_VARIABLE VARIABLE=do_mesh VALUE=0 12 | RESPOND type=error MSG="Pre-Print Mesh has been disabled." 13 | {% endif %} 14 | 15 | [gcode_macro _DO_MESH] 16 | description: Performs a mesh if toggle is enabled 17 | gcode: 18 | {% set svv = printer.save_variables.variables %} 19 | {% if svv.do_mesh != 0 %} 20 | BED_MESH_CALIBRATE 21 | {% endif %} 22 | 23 | 24 | # The following command goes in your START_PRINT macro in place of BED_MESH_CALIBRATE: 25 | # 26 | # DO_MESH 27 | # 28 | # 29 | # 30 | # NOTE: 31 | # The following are prerequisite config sections: 32 | # These must be included if not already in your config. 33 | # 34 | # 35 | # This is used to output the state in the console when toggling the mesh. 36 | # So you know whether you turned it on or off. 37 | # To avoid this, you can comment out the RESPOND lines, or replace them with M117. 38 | [respond] 39 | # 40 | # 41 | # This is required to save variables that persist between restarts. 42 | # The entire functionality of this macro depends on this config section existing. 43 | # This is mandatory (unless already configured) 44 | [save_variables] 45 | filename: ~/printer_data/config/variables.cfg 46 | # 47 | # The filename configured can be anything you like, as long as it is accessible by the Klipper host software. -------------------------------------------------------------------------------- /extras/old_machine/BEEPER.cfg: -------------------------------------------------------------------------------- 1 | #[gcode_macro M300] 2 | #gcode: 3 | # # Use a default 1kHz tone if S is omitted. 4 | # {% set S = params.S|default(1000)|int %} 5 | # # Use a 10ms duration is P is omitted. 6 | # {% set P = params.P|default(100)|int %} 7 | # SET_PIN PIN=_beeper VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 } 8 | # G4 P{P} 9 | # SET_PIN PIN=_beeper VALUE=0 10 | 11 | [gcode_macro BEEP] 12 | gcode: 13 | # Parameters 14 | {% set i = params.I|default(1)|int %} ; Iterations (number of times to beep). 15 | {% set dur = params.DUR|default(100)|int %} ; Duration/wait of each beep in ms. Default 100ms. 16 | {% set freq = params.FREQ|default(2000)|int %} ; Frequency in Hz. Default 2kHz. 17 | 18 | {% for iteration in range(i|int) %} 19 | SET_PIN PIN=_beeper VALUE=0.8 CYCLE_TIME={ 1.0/freq if freq > 0 else 1 } 20 | G4 P{dur} 21 | SET_PIN PIN=_beeper VALUE=0 22 | G4 P{dur} 23 | {% endfor %} -------------------------------------------------------------------------------- /extras/old_machine/pi2c.cfg: -------------------------------------------------------------------------------- 1 | [mcu pi2c] 2 | serial: /dev/serial/by-id/usb-Klipper_rp2040_415032383337300D-if00 3 | restart_method: command 4 | 5 | [output_pin _pi2c_led] 6 | pin: pi2c:gpio25 7 | value: 1 8 | shutdown_value: 0 9 | 10 | [static_digital_output enable_pi2c_rgb] 11 | pins:pi2c:gpio11 -------------------------------------------------------------------------------- /extras/old_machine/tool-board-primary.cfg: -------------------------------------------------------------------------------- 1 | # BigTreeTech EBB42 CAN v1.1 Toolboard 2 | 3 | [mcu] 4 | #serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 5 | canbus_uuid: e8d3e3388393 6 | 7 | [adxl345 hotend] 8 | cs_pin: PB12 9 | spi_software_sclk_pin: PB10 10 | spi_software_mosi_pin: PB11 11 | spi_software_miso_pin: PB2 12 | axes_map: x,y,z 13 | 14 | [extruder] 15 | step_pin: PD0 16 | dir_pin: PD1 17 | enable_pin: !PD2 18 | microsteps: 16 19 | rotation_distance: 24.395 20 | #rotation_distance: 24.615 21 | nozzle_diameter: 0.400 22 | filament_diameter: 1.750 23 | max_extrude_only_distance: 100.0 24 | max_extrude_cross_section: 50.0 25 | min_extrude_temp: 180 26 | pressure_advance = 0.035 27 | smooth_time: 0.040 28 | heater_pin: PA2 29 | min_temp: 0 30 | max_temp: 450 31 | 32 | sensor_type:MAX31865 33 | sensor_pin: PA4 34 | spi_bus: spi1 35 | rtd_nominal_r: 1000 36 | rtd_reference_r: 4300 37 | rtd_num_of_wires: 2 38 | 39 | [tmc2209 extruder] 40 | uart_pin: PA15 41 | run_current: 0.650 42 | # hold_current 0.500 43 | stealthchop_threshold: 999999 44 | 45 | [fan] 46 | pin: PA0 47 | 48 | [heater_fan hotend_fan] 49 | pin: PA1 50 | heater: extruder 51 | heater_temp: 60.0 52 | 53 | [neopixel _sb_leds] 54 | pin: PD3 55 | chain_count: 10 56 | color_order: GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW, GRBW 57 | initial_RED: 0.5 58 | initial_GREEN: 0.5 59 | initial_BLUE: 0.5 60 | initial_WHITE: 0.5 61 | 62 | [filament_motion_sensor smart_filament_sensor] 63 | switch_pin: ^PB6 64 | detection_length: 10.0 65 | extruder: extruder 66 | pause_on_runout: False #pause handled by macro 67 | runout_gcode: 68 | FILAMENT_RUNOUT 69 | insert_gcode: 70 | M117 Filament inserted 71 | event_delay: 3.0 72 | pause_delay: 0.0001 73 | 74 | [bltouch] 75 | sensor_pin: ^PB8 76 | control_pin: PB9 77 | x_offset: -44 78 | y_offset: -7 79 | #z_offset: 2.295 80 | probe_with_touch_mode: True 81 | pin_up_touch_mode_reports_triggered: True 82 | stow_on_each_sample: False 83 | samples: 3 84 | samples_tolerance: 0.0125 85 | samples_tolerance_retries: 5 86 | speed: 20 -------------------------------------------------------------------------------- /extras/old_machine/tool-board.cfg: -------------------------------------------------------------------------------- 1 | # BigTreeTech EBB42 CAN v1.1 Toolboard 2 | 3 | [mcu toolboard] 4 | #serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 5 | canbus_uuid: e8d3e3388393 6 | 7 | [adxl345 hotend] 8 | cs_pin: toolboard: PB12 9 | spi_software_sclk_pin: toolboard: PB10 10 | spi_software_mosi_pin: toolboard: PB11 11 | spi_software_miso_pin: toolboard: PB2 12 | axes_map: x,y,z 13 | 14 | [extruder] 15 | step_pin: toolboard: PD0 16 | dir_pin: !toolboard: PD1 17 | enable_pin: !toolboard: PD2 18 | rotation_distance: 22.6789511 19 | #rotation_distance: 22.48094064725844 20 | microsteps: 16 21 | full_steps_per_rotation: 200 22 | gear_ratio: 50:10 23 | nozzle_diameter: 0.400 24 | filament_diameter: 1.750 25 | max_extrude_cross_section: 5 26 | max_extrude_only_distance: 1100 27 | min_extrude_temp: 180 28 | pressure_advance = 0.035 29 | smooth_time: 0.040 30 | heater_pin: toolboard: PA2 31 | min_temp: 0 32 | max_temp: 300 33 | #max_temp: 450 34 | 35 | sensor_type:MAX31865 36 | sensor_pin: toolboard: PA4 37 | spi_bus: spi1 38 | rtd_nominal_r: 1000 39 | rtd_reference_r: 4300 40 | rtd_num_of_wires: 2 41 | 42 | [tmc2209 extruder] 43 | uart_pin: toolboard: PA15 44 | run_current: 0.350 45 | # hold_current 0.500 46 | stealthchop_threshold: 999999 47 | 48 | [fan] 49 | pin: toolboard: PA0 50 | 51 | [heater_fan hotend_fan] 52 | pin: toolboard: PA1 53 | heater: extruder 54 | heater_temp: 60.0 55 | 56 | [neopixel _sb_leds] 57 | pin: toolboard:PD3 58 | chain_count: 10 59 | color_order: GRB 60 | #color_order: GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW, GRBW 61 | initial_RED: 0.5 62 | initial_GREEN: 0.5 63 | initial_BLUE: 0.5 64 | initial_WHITE: 0.5 -------------------------------------------------------------------------------- /extras/old_machine/webcam.conf: -------------------------------------------------------------------------------- 1 | #### webcam.conf 2 | #### This is mainsail / MainsailOS default config. 3 | #### See: 4 | #### https://github.com/mainsail-crew/crowsnest/blob/master/README.md 5 | #### for details to configure to your needs. 6 | 7 | 8 | ##################################################################### 9 | #### ##### 10 | #### Information about ports and according URL's ##### 11 | #### ##### 12 | ##################################################################### 13 | #### ##### 14 | #### Port 8080 equals /webcam/?action=[stream/snapshot] ##### 15 | #### Port 8081 equals /webcam2/?action=[stream/snapshot] ##### 16 | #### Port 8082 equals /webcam3/?action=[stream/snapshot] ##### 17 | #### Port 8083 equals /webcam4/?action=[stream/snapshot] ##### 18 | #### ##### 19 | ##################################################################### 20 | 21 | 22 | [crowsnest] 23 | log_path: ~/klipper_logs/crowsnest.log 24 | log_level: verbose # Valid Options are quiet/verbose/debug 25 | delete_log: false # Deletes log on every restart, if set to true 26 | 27 | [cam camera] 28 | mode: mjpg # mjpg/rtsp 29 | port: 8080 # Port 30 | device: /dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera_SN0001-video-index0 # See Log for available ... 31 | resolution: 1920x1080 # widthxheight format 32 | max_fps: 30 # If Hardware Supports this it will be forced, ohterwise ignored/coerced. 33 | custom_flags: # You can run the Stream Services with custom flags. 34 | v4l2ctl: power_line_frequency=2,exposure_auto_priority=1,sharpness=10 # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of. -------------------------------------------------------------------------------- /extras/old_machine/webcam.txt: -------------------------------------------------------------------------------- 1 | ### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText. 2 | ### Do not use Notepad or WordPad. 3 | 4 | ### MacOSX users: If you use Textedit to edit this file make sure to use 5 | ### "plain text format" and "disable smart quotes" in "Textedit > Preferences" 6 | 7 | ### Configure which camera to use 8 | # 9 | # Available options are: 10 | # - auto: tries first usb webcam, if that's not available tries raspi cam 11 | # - usb: only tries usb webcam 12 | # - raspi: only tries raspi cam 13 | # 14 | # Defaults to auto 15 | # 16 | #camera="auto" 17 | 18 | ### Additional options to supply to MJPG Streamer for the USB camera 19 | # 20 | # See https://faq.octoprint.org/mjpg-streamer-config for available options 21 | # 22 | # Defaults to a resolution of 640x480 px and a framerate of 10 fps 23 | # 24 | camera_usb_options="-r 1920x1080 -f 30 -d /dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera_SN0001-video-index0" 25 | 26 | ### Additional webcam devices known to cause problems with -f 27 | # 28 | # Apparently there a some devices out there that with the current 29 | # mjpg_streamer release do not support the -f parameter (for specifying 30 | # the capturing framerate) and will just refuse to output an image if it 31 | # is supplied. 32 | # 33 | # The webcam daemon will detect those devices by their USB Vendor and Product 34 | # ID and remove the -f parameter from the options provided to mjpg_streamer. 35 | # 36 | # By default, this is done for the following devices: 37 | # Logitech C170 (046d:082b) 38 | # GEMBIRD (1908:2310) 39 | # Genius F100 (0458:708c) 40 | # Cubeternet GL-UPC822 UVC WebCam (1e4e:0102) 41 | # 42 | # Using the following option it is possible to add additional devices. If 43 | # your webcam happens to show above symptoms, try determining your cam's 44 | # vendor and product id via lsusb, activating the line below by removing # and 45 | # adding it, e.g. for two broken cameras "aabb:ccdd" and "aabb:eeff" 46 | # 47 | # additional_brokenfps_usb_devices=("aabb:ccdd" "aabb:eeff") 48 | # 49 | # 50 | #additional_brokenfps_usb_devices=() 51 | 52 | ### Additional options to supply to MJPG Streamer for the RasPi Cam 53 | # 54 | # See https://faq.octoprint.org/mjpg-streamer-config for available options 55 | # 56 | # Defaults to 10fps 57 | # 58 | #camera_raspi_options="-fps 10" 59 | 60 | ### Configuration of camera HTTP output 61 | # 62 | # Usually you should NOT need to change this at all! Only touch if you 63 | # know what you are doing and what the parameters mean. 64 | # 65 | # Below settings are used in the mjpg-streamer call like this: 66 | # 67 | # -o "output_http.so -w $camera_http_webroot $camera_http_options" 68 | # 69 | # Current working directory is the mjpg-streamer base directory. 70 | # 71 | #camera_http_webroot="./www-fluidd" 72 | #camera_http_options="-n" 73 | 74 | ### EXPERIMENTAL 75 | # Support for different streamer types. 76 | # 77 | # Available options: 78 | # mjpeg [default] - stable MJPG-streamer 79 | #camera_streamer=mjpeg 80 | -------------------------------------------------------------------------------- /extras/pi_gpio_pinout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/pi_gpio_pinout.png -------------------------------------------------------------------------------- /extras/picanpi.cfg: -------------------------------------------------------------------------------- 1 | [mcu pican_pi] 2 | serial: /dev/serial/by-id/usb-Klipper_rp2040_415032383337300D-if00 3 | restart_method: command 4 | 5 | [output_pin _pican_led] 6 | pin: pican_pi:gpio25 7 | value: 1 8 | shutdown_value: 0 9 | 10 | [static_digital_output enable_pican_rgb] 11 | pins:pican_pi:gpio11 -------------------------------------------------------------------------------- /extras/restart_klipperscreen/RESTART_KLIPPERSCREEN.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Restart KlipperScreen Macro # 3 | # Version 1.0.0 2023-1-22 # 4 | ##################################### 5 | 6 | 7 | ################################ 8 | ############ MACRO ############# 9 | ################################ 10 | [gcode_macro RESTART_KLIPPERSCREEN] 11 | description: Restart the KlipperScreen process 12 | gcode: 13 | RUN_SHELL_COMMAND CMD=restart_ks 14 | 15 | ################################ 16 | ########### SCRIPT ############# 17 | ################################ 18 | [gcode_shell_command restart_ks] 19 | command: sh /home/pi/printer_data/config/restart_ks.sh 20 | timeout: 60. 21 | verbose: True 22 | 23 | # NOTE: Please change the path of the script to match your machine -------------------------------------------------------------------------------- /extras/restart_klipperscreen/restart_ks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2023 Chris Laprade 4 | # 5 | # This file is part of zippy_config. 6 | # 7 | # zippy_config is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # zippy_config is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with zippy_config. If not, see . 19 | 20 | systemctl restart KlipperScreen -------------------------------------------------------------------------------- /extras/rp2040_pico_can.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/rp2040_pico_can.png -------------------------------------------------------------------------------- /extras/rp2040_pico_usb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/rp2040_pico_usb.png -------------------------------------------------------------------------------- /extras/samples/README: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022 Chris Laprade (chris@rootiest.com) 2 | // 3 | // This software is released under the MIT License. 4 | // https://opensource.org/licenses/MIT 5 | 6 | # Samples 7 | 8 | This folder contains sanitized samples of the config files that are not synced by this repo. 9 | 10 | ## printer.cfg 11 | 12 | This file is not synced so as to not overwrite the SAVE_CONFIG block at the end. This is a sample of the contents of that file. 13 | 14 | ## variables.cfg 15 | 16 | This file is also not synced in order to avoid overwriting it, but it's also created and filled entirely by values from the SAVE_VARIABLE command and requires no manual editing. 17 | 18 | ## moonraker_secrets.ini 19 | 20 | This file is for storing passwords and other private information to use within moonraker's config. All values have been sanitized. 21 | 22 | ## telegram.conf 23 | 24 | This is the config file for moonraker-telegram-bot. Sanitized to remove private telegram tokens and chat IDs. 25 | 26 | ## telegram_config.conf 27 | 28 | This is the config file for moonraker-telegram. Again, sanitized remove private telegram tokens and chat IDs. 29 | 30 | ## mooncord.json 31 | 32 | This is the config file for Mooncord. Sanitized to remove private Discord information. -------------------------------------------------------------------------------- /extras/samples/mooncord.json: -------------------------------------------------------------------------------- 1 | { 2 | "connection": { 3 | "moonraker_socket_url": "ws://127.0.0.1/websocket", 4 | "moonraker_url": "http://127.0.0.1", 5 | "moonraker_token": "aa111aa1aa11111a11111a11a1a111a1", 6 | "bot_token": "a11a1aa1a11a1a111aaa11a11a111a1a11111a1a1111111aaa1aa11aaa11a1a1" 7 | }, 8 | "language": { 9 | "messages": "en", 10 | "command_syntax": "en", 11 | "buttons_use_syntax_locale": false 12 | }, 13 | "permission": { 14 | "controllers": { 15 | "roles": "", 16 | "users": "" 17 | } 18 | }, 19 | "webcam": { 20 | "url": "http://127.0.0.1/webcam/?action=snapshot" 21 | } 22 | } -------------------------------------------------------------------------------- /extras/samples/moonraker_secrets.ini: -------------------------------------------------------------------------------- 1 | # moonraker_secrets.ini 2 | 3 | [mqtt_credentials] 4 | address: 192.168.86.210 5 | username: moonraker 6 | password: AA1aaaaA1aAaAAaAaAAaAAaA1aaaAa1aAaAa 7 | 8 | [machine] 9 | password: hunter2 -------------------------------------------------------------------------------- /extras/samples/printer.cfg: -------------------------------------------------------------------------------- 1 | # Rootiest Zippy Klipper config 2 | 3 | # Machine directory 4 | [include machine/*.cfg] 5 | 6 | #*# <---------------------- SAVE_CONFIG ----------------------> 7 | #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. 8 | #*# 9 | #*# [bltouch] 10 | #*# z_offset = 1.841 11 | #*# 12 | #*# [extruder] 13 | #*# control = pid 14 | #*# pid_kp = 20.540 15 | #*# pid_ki = 1.151 16 | #*# pid_kd = 91.661 17 | #*# 18 | #*# [heater_bed] 19 | #*# control = pid 20 | #*# pid_kp = 72.153 21 | #*# pid_ki = 1.314 22 | #*# pid_kd = 990.297 23 | #*# 24 | #*# [bed_mesh backup] 25 | #*# version = 1 26 | #*# points = 27 | #*# 0.090000, 0.112500, 0.110000, 0.175000, 0.150000, 0.115000, 0.105000, 0.102500, 0.095000, 0.042500 28 | #*# 0.020000, 0.037500, 0.030000, 0.065000, 0.090000, 0.072500, 0.075000, 0.075000, 0.070000, 0.012500 29 | #*# -0.027500, 0.002500, -0.002500, 0.010000, 0.045000, 0.027500, 0.037500, 0.022500, 0.020000, -0.037500 30 | #*# -0.062500, -0.027500, -0.045000, -0.030000, 0.005000, -0.017500, -0.020000, -0.012500, -0.012500, -0.075000 31 | #*# -0.067500, -0.022500, -0.035000, -0.032500, -0.000000, -0.022500, -0.022500, -0.025000, -0.025000, -0.090000 32 | #*# -0.055000, -0.012500, -0.032500, -0.022500, 0.020000, -0.010000, -0.012500, -0.002500, -0.000000, -0.062500 33 | #*# -0.037500, 0.012500, -0.005000, -0.000000, 0.025000, 0.002500, -0.007500, -0.005000, -0.012500, -0.075000 34 | #*# 0.032500, 0.080000, 0.047500, 0.062500, 0.090000, 0.062500, 0.050000, 0.057500, 0.055000, -0.020000 35 | #*# 0.095000, 0.137500, 0.122500, 0.140000, 0.160000, 0.127500, 0.122500, 0.117500, 0.107500, 0.032500 36 | #*# 0.150000, 0.185000, 0.172500, 0.185000, 0.220000, 0.185000, 0.170000, 0.172500, 0.162500, 0.082500 37 | #*# tension = 0.2 38 | #*# min_x = 15.0 39 | #*# algo = bicubic 40 | #*# y_count = 10 41 | #*# mesh_y_pps = 5 42 | #*# min_y = 15.0 43 | #*# x_count = 10 44 | #*# max_y = 195.0 45 | #*# mesh_x_pps = 5 46 | #*# max_x = 195.0 47 | #*# 48 | #*# [input_shaper] 49 | #*# shaper_type_x = ei 50 | #*# shaper_freq_x = 39.4 51 | #*# shaper_type_y = 2hump_ei 52 | #*# shaper_freq_y = 45.2 53 | #*# 54 | #*# [bed_mesh default] 55 | #*# version = 1 56 | #*# points = 57 | #*# 0.191578, 0.201578, 0.189912, 0.146578, 0.129912 58 | #*# 0.100745, 0.096578, 0.039078, 0.046578, 0.059912 59 | #*# 0.050745, 0.069078, 0.015745, -0.009255, -0.001755 60 | #*# 0.099912, 0.086578, 0.032412, -0.010088, -0.030922 61 | #*# 0.200745, 0.186578, 0.155745, 0.111578, 0.078245 62 | #*# tension = 0.2 63 | #*# min_x = 34.88 64 | #*# algo = bicubic 65 | #*# y_count = 5 66 | #*# mesh_y_pps = 5 67 | #*# min_y = 27.0 68 | #*# x_count = 5 69 | #*# max_y = 192.0 70 | #*# mesh_x_pps = 5 71 | #*# max_x = 195.11 72 | -------------------------------------------------------------------------------- /extras/samples/telegram.conf: -------------------------------------------------------------------------------- 1 | [bot] 2 | server: localhost 3 | chat_id: 1111111111 4 | bot_token: 1111111111:AAAAaA1aaaaaaAAAaAaAa_1AaaAaaAaa1a1 5 | log_path: /home/pi/klipper_logs 6 | light_device: Lights 7 | power_device: Printer 8 | 9 | [camera] 10 | host: http://localhost:8080/?action=stream 11 | 12 | [progress_notification] 13 | percent: 5 14 | height: 5 15 | time: 5 16 | 17 | [timelapse] 18 | cleanup: true 19 | height: 0.2 20 | time: 5 21 | target_fps: 30 22 | 23 | -------------------------------------------------------------------------------- /extras/samples/telegram_config.conf: -------------------------------------------------------------------------------- 1 | # Edit only the variables between the "" 2 | # Port from moonraker 3 | port="7125" 4 | # Your telegram bot token 5 | token="1111111111:AAAAaA1aaaaaaAAAaAaAa_1AaaAaaAaa1a1" 6 | # Your chat ID 7 | chatid="1111111111" 8 | # 9 | #Your moonraker API-Key when u use force login true 10 | api_key="1aa11a111a111a1a111111aa1a111aa1a" 11 | # messages for the states 12 | ### for the placeholders in the messages look at https://github.com/Raabi91/moonraker-telegram/blob/master/docs/Variables.md 13 | # 14 | # Start message 15 | msg_start="Started printing $print_filename" 16 | # error/failed message 17 | msg_error="printing of $print_filename Failed" 18 | # Pause message 19 | msg_pause="printing of $print_filename Paused" 20 | # Complete message 21 | msg_end="Finished printing $print_filename" 22 | # Time message 23 | msg_state="Printing $print_filename at $print_progress. Current Time $print_current. Remaining Time $print_remaining" 24 | # standby message 25 | msg_standby="hey, i'm idling, please let me print something" 26 | # complete message 27 | msg_complete="hey, i finished the last print now i am idling" 28 | # paused message 29 | msg_paused="hey, i'm on break, please take a look" 30 | # error message 31 | msg_error="hey, i had a error. please look it up" 32 | # 33 | # time in seconds to get an State update. to disable set it to 0 34 | time="0" 35 | # Progress in % to get an State update. to disable set it to 0 36 | progress="0" 37 | # Z Hight in mm to get an State update. to disable set it to 0 38 | z_high="0" 39 | # with picture = 1, without picture = 0 40 | picture="1" 41 | # with 5sec gif at state message = 1, without gif = 0 42 | gif="1" 43 | # your webcam snapshot link 44 | webcam="http://127.0.0.1/webcam/?action=snapshot" 45 | #rotate the pic bevor sending, use degrease 0-360 46 | rotate="0" 47 | #flip the pic horizontally bevor sending, 1 = yes, 0 = No 48 | horizontally="0" 49 | #flip the pic vertically bevor sending, 1 = yes, 0 = No 50 | vertically="0" 51 | # Make all commands Disable with 1 52 | bot_disable="0" 53 | # delay for the Print start Message 54 | delay_start_msg="0" 55 | # delay for the Print end Message 56 | delay_end_msg="0" 57 | # Delay for the Pause Message 58 | delay_pause_msg="0" 59 | #Led on link for picture 60 | led_on="http://127.0.0.1:$port/printer/gcode/script?script=WLED_ON" 61 | #Led on wait time before picture is taken (in seconds) 62 | led_on_delay="1" 63 | #Led off link for picture 64 | #led_off="http://127.0.0.1:$port/printer/gcode/script?script=WLED_OFF" 65 | #Led off wait time after picture is taken (in seconds) 66 | #led_off_delay="1" -------------------------------------------------------------------------------- /extras/samples/variables.cfg: -------------------------------------------------------------------------------- 1 | [Variables] 2 | boot_shutdown = 0 3 | bowden_len = 100 4 | last_color = '' 5 | last_filament = 'ASA' 6 | last_material = 'ASA' 7 | park_x = 5 8 | park_y = 223 9 | park_z = 150 10 | scrub_time = 666 11 | 12 | -------------------------------------------------------------------------------- /extras/shaper/ADXL_SHAPER.cfg: -------------------------------------------------------------------------------- 1 | # These macros require the gcode_shell_command extension. 2 | # https://github.com/th33xitus/kiauh/blob/master/docs/gcode_shell_command.md 3 | 4 | [respond] 5 | 6 | [gcode_macro LAZY_HOME] 7 | gcode: 8 | {% if printer.toolhead.homed_axes != "xyz" %} 9 | M118 Homing axis 10 | G28 11 | {% endif %} 12 | 13 | [gcode_macro ADXL_SHAPE_ALL] 14 | description: Test resonances for both axis 15 | gcode: 16 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 17 | LAZY_HOME 18 | SHAPER_CALIBRATE 19 | RUN_SHELL_COMMAND CMD=adxl_shape_x 20 | RUN_SHELL_COMMAND CMD=adxl_shape_y 21 | M118 Test done 22 | SAVE_CONFIG 23 | 24 | [gcode_macro ADXL_SHAPE_X] 25 | description: Test resonances for X axis 26 | gcode: 27 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 28 | LAZY_HOME 29 | SHAPER_CALIBRATE AXIS=x 30 | RUN_SHELL_COMMAND CMD=adxl_shape_x 31 | M118 Test done 32 | SAVE_CONFIG 33 | 34 | [gcode_macro ADXL_SHAPE_Y] 35 | description: Test resonances for Y axis 36 | gcode: 37 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 38 | LAZY_HOME 39 | SHAPER_CALIBRATE AXIS=y 40 | RUN_SHELL_COMMAND CMD=adxl_shape_y 41 | M118 Test done 42 | SAVE_CONFIG 43 | 44 | [gcode_shell_command adxl_shape_x] 45 | command: sh ~/printer_data/config/shaper/adxl_shape_x.sh # edit: ´~/printer_data/config/shaper/´ to where your .sh file lays 46 | timeout: 60. 47 | verbose: True 48 | 49 | [gcode_shell_command adxl_shape_y] 50 | command: sh ~/printer_data/config/shaper/adxl_shape_y.sh # edit: ´~/printer_data/config/shaper/´ to where your .sh file lays 51 | timeout: 60. 52 | verbose: True 53 | 54 | ### name file: adxl_shape_x.sh 55 | #~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_x_*.csv -o ~/printer_data/config/shaper_calibrate_x.png 56 | 57 | ### name file: adxl_shape_y.sh 58 | #~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_y_*.csv -o ~/printer_data/config/shaper_calibrate_y.png 59 | -------------------------------------------------------------------------------- /extras/shaper/adxl_shape_x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python3 ~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_x_*.csv -o ~/printer_data/config/shaper/shaper_calibrate_x.png -------------------------------------------------------------------------------- /extras/shaper/adxl_shape_y.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | python3 ~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_y_*.csv -o ~/printer_data/config/shaper/shaper_calibrate_y.png -------------------------------------------------------------------------------- /extras/skr-pico_canbridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/skr-pico_canbridge.png -------------------------------------------------------------------------------- /extras/skr-pico_canbridge.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/skr-pico_canbridge.uf2 -------------------------------------------------------------------------------- /extras/start_print_heat_soak.cfg: -------------------------------------------------------------------------------- 1 | # Run with: 2 | # START_HEAT_SOAK SOAK=10 BED_TEMP=110 3 | # 4 | # Or from START_PRINT: 5 | # START_HEAT_SOAK SOAK=10 BED_TEMP={BED_TEMP} 6 | 7 | [gcode_macro START_HEAT_SOAK] 8 | gcode: 9 | {% set SOAK = params.SOAK|default(15) %} 10 | {% set BED_TEMP = params.BED_TEMP|default(100)|float %} 11 | M117 Starting Warmup #if the bed is already at the correct target temp, we assume no heat soak is necessary. 12 | {% if (SOAK) <= 0 or (printer.heater_bed.target >= (BED_TEMP - 20)) %} 13 | {% else %} 14 | M117 Heating for Soak 15 | M190 S{BED_TEMP} 16 | M117 Starting Soak 17 | {% for timer in range( SOAK,0,-1) %} #we cycle once a minute, so we can send an update to keep octoprint happy, rather than just sleeping for the entire soak 18 | M117 Soak: {timer|int}m remaining 19 | M105 20 | G4 P60000 21 | {% endfor %} 22 | M117 Soak Complete 23 | {% endif %} -------------------------------------------------------------------------------- /extras/start_soak.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro HEATSOAK_CHAMBER] 2 | description: Heatsoak chamber to a specific temperature with a timeout 3 | gcode: 4 | {% set chamber_sensor_enabled = printer["gcode_macro _USER_VARIABLES"].chamber_temperature_sensor_enabled %} 5 | 6 | {% if chamber_sensor_enabled %} 7 | {% set SETPOINT_TEMP = params.TEMP|default(0)|float %} 8 | {% set MAXTIME = params.MAXTIME|default(printer["gcode_macro _USER_VARIABLES"].print_default_chamber_max_heating_time)|int %} 9 | 10 | {% set verbose = printer["gcode_macro _USER_VARIABLES"].verbose %} 11 | 12 | {% for _ in range(1, MAXTIME) %} 13 | _WAIT_CHAMBER_TEMP TEMP={SETPOINT_TEMP} 14 | {% endfor %} 15 | {% if verbose %} 16 | RESPOND MSG="Chamber temperature OK !" 17 | {% endif %} 18 | {% endif %} 19 | 20 | 21 | [gcode_macro _WAIT_CHAMBER_TEMP] 22 | # This macro is needed to allow klipper populate a new value in the printer[...].temperature variable 23 | # as each variables are populated only once at the beginning of every macro call 24 | gcode: 25 | {% set chamber_sensor_enabled = printer["gcode_macro _USER_VARIABLES"].chamber_temperature_sensor_enabled %} 26 | 27 | {% if chamber_sensor_enabled %} 28 | {% set chamber_sensor_name = printer["gcode_macro _USER_VARIABLES"].chamber_temperature_sensor_name %} 29 | {% set SETPOINT_TEMP = params.TEMP|default(0)|float %} 30 | {% set CURRENT_TEMP = printer["temperature_sensor " ~ chamber_sensor_name].temperature|float %} 31 | 32 | {% if CURRENT_TEMP <= SETPOINT_TEMP %} 33 | RESPOND MSG="Heating up the chamber : {CURRENT_TEMP}/{SETPOINT_TEMP}" 34 | G4 P{60000 * 1} # wait a minute and check again if called in a loop 35 | {% endif %} 36 | {% endif %} 37 | 38 | 39 | [gcode_macro HEATSOAK_BED] 40 | description: Heatsoak bed at specified temperature and wait for a specific amount of time 41 | gcode: 42 | {% set SETPOINT_TEMP = params.TEMP|default(0)|int %} 43 | {% set TIME = params.SOAKTIME|default(8)|int %} 44 | 45 | {% set verbose = printer["gcode_macro _USER_VARIABLES"].verbose %} 46 | 47 | {% if verbose %} 48 | RESPOND MSG="Heating up bed..." 49 | {% endif %} 50 | 51 | M190 S{SETPOINT_TEMP} 52 | 53 | {% if TIME > 0 %} 54 | {% for _ in range(1, TIME) %} 55 | RESPOND MSG="Heatsoak..." 56 | G4 P{60000 * 1} 57 | {% endfor %} 58 | {% else %} 59 | RESPOND MSG="No heatsoak needed, continue" 60 | {% endif %} 61 | 62 | {% if verbose %} 63 | RESPOND MSG="Bed temperature OK" 64 | {% endif %} 65 | -------------------------------------------------------------------------------- /extras/stm32_mini12864_usb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/extras/stm32_mini12864_usb.png -------------------------------------------------------------------------------- /extras/tool_swap/swap_tools.cfg: -------------------------------------------------------------------------------- 1 | [gcode_shell_command tool1] 2 | command: sh ~/printer_data/config/tool_swap.sh 1 3 | timeout: 60.0 4 | [gcode_shell_command tool2] 5 | command: sh ~/printer_data/config/tool_swap.sh 2 6 | timeout: 60.0 7 | [respond] 8 | [gcode_macro CHANGE_TOOL] 9 | gcode: 10 | {% set TOOL = params.TOOL|default(1)|int %} 11 | {% if TOOL == 1 %} 12 | RUN_SHELL_COMMAND CMD=tool1 13 | G4 S10 ;wait 10 seconds 14 | FIRMWARE_RESTART 15 | {% elif TOOL == 2 %} 16 | RUN_SHELL_COMMAND CMD=tool2 17 | G4 S10 ;wait 10 seconds 18 | FIRMWARE_RESTART 19 | {% else %} 20 | RESPOND TYPE=error MSG="Invalid tool: {TOOL}" 21 | {% endif %} -------------------------------------------------------------------------------- /extras/tool_swap/tool1.cfg: -------------------------------------------------------------------------------- 1 | # V6 Toolhead 2 | 3 | [extruder] 4 | step_pin: toolboard: PD0 5 | dir_pin: toolboard: PD1 6 | enable_pin: !toolboard: PD2 7 | gear_ratio: 5:1 8 | microsteps: 16 9 | rotation_distance: 22.388 10 | nozzle_diameter: 0.400 11 | filament_diameter: 1.750 12 | max_extrude_only_distance: 100.0 13 | max_extrude_cross_section: 50.0 14 | min_extrude_temp: 180 15 | pressure_advance = 0.035 16 | smooth_time: 0.040 17 | heater_pin: toolboard: PA2 18 | min_temp: 0 19 | max_temp: 450 20 | sensor_type:MAX31865 21 | sensor_pin: toolboard: PA4 22 | spi_bus: spi1 23 | rtd_nominal_r: 1000 24 | rtd_reference_r: 4300 25 | rtd_num_of_wires: 2 26 | 27 | [bltouch] 28 | sensor_pin: ^toolboard:PB8 29 | control_pin: toolboard:PB9 30 | x_offset: 44.2 31 | y_offset: 8.25 32 | probe_with_touch_mode: True 33 | pin_up_touch_mode_reports_triggered: True 34 | stow_on_each_sample: False 35 | samples: 3 36 | samples_tolerance: 0.0125 37 | samples_tolerance_retries: 5 38 | speed: 20 -------------------------------------------------------------------------------- /extras/tool_swap/tool2.cfg: -------------------------------------------------------------------------------- 1 | # MK8 Toolhead 2 | 3 | [extruder] 4 | step_pin: toolboard: PD0 5 | dir_pin: toolboard: PD1 6 | enable_pin: !toolboard: PD2 7 | gear_ratio: 5:1 8 | microsteps: 16 9 | rotation_distance: 22.388 10 | nozzle_diameter: 0.400 11 | filament_diameter: 1.750 12 | max_extrude_only_distance: 100.0 13 | max_extrude_cross_section: 50.0 14 | min_extrude_temp: 180 15 | pressure_advance = 0.035 16 | smooth_time: 0.040 17 | heater_pin: toolboard: PA2 18 | min_temp: 0 19 | max_temp: 450 20 | sensor_type:MAX31865 21 | sensor_pin: toolboard: PA4 22 | spi_bus: spi1 23 | rtd_nominal_r: 1000 24 | rtd_reference_r: 4300 25 | rtd_num_of_wires: 2 26 | 27 | [bltouch] 28 | sensor_pin: ^toolboard:PB8 29 | control_pin: toolboard:PB9 30 | x_offset: 44.2 31 | y_offset: 8.25 32 | probe_with_touch_mode: True 33 | pin_up_touch_mode_reports_triggered: True 34 | stow_on_each_sample: False 35 | samples: 3 36 | samples_tolerance: 0.0125 37 | samples_tolerance_retries: 5 38 | speed: 20 -------------------------------------------------------------------------------- /extras/tool_swap/tool_swap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2022 Chris Laprade 4 | # 5 | # This file is part of zippy_config. 6 | # 7 | # zippy_config is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # zippy_config is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with zippy_config. If not, see . 19 | 20 | 21 | ######## Tool Swap Script ######## 22 | ### Written with the assistance of an AI ### 23 | ############################################ 24 | 25 | # Define the file to be searched 26 | filename=~/printer_data/config/printer.cfg 27 | 28 | # Check if the required number of arguments have been provided 29 | if [ $# -ne 1 ] 30 | then 31 | echo "Error: Incorrect number of arguments. 1 argument required." 32 | exit 1 33 | fi 34 | 35 | # Assign the argument to a variable as an integer 36 | 37 | tool_number=$1 38 | # Convert to an inteeger 39 | tool_number=$((tool_number)) 40 | 41 | 42 | # Check if the input parameter is a valid integer 43 | if [ $tool_number -lt 0 ] 44 | then 45 | echo "Error: Invalid input. Integer must be greater than or equal to 0." 46 | exit 1 47 | fi 48 | 49 | # Construct the replacement string 50 | replace_string="[include tool$tool_number.cfg]" 51 | 52 | # Check if the file exists 53 | if [ ! -f "$filename" ] 54 | then 55 | echo "Error: File '$filename' not found." 56 | exit 1 57 | fi 58 | 59 | # Use sed to search for the regex pattern and replace the matching line with the replace string 60 | temp_file=$(mktemp) 61 | sed -e '/\[include tool[0-9]\+\.cfg\]/c\'"$replace_string" "$filename" > "$temp_file" 62 | 63 | # Check if any changes were made 64 | if cmp -s "$temp_file" "$filename" 65 | then 66 | echo "No changes made." 67 | else 68 | # Check if more than one occurrence of the regex pattern was found 69 | occurrences=$(grep -c '\[include tool[0-9]\+\.cfg\]' "$filename") 70 | if [ "$occurrences" -gt 1 ] 71 | then 72 | echo "Error: More than one occurrence of the regex pattern was found." 73 | exit 1 74 | fi 75 | 76 | mv "$temp_file" "$filename" 77 | fi 78 | 79 | -------------------------------------------------------------------------------- /extras/wled_cfg.json: -------------------------------------------------------------------------------- 1 | {"rev":[1,0],"vid":2203150,"id":{"mdns":"wled-3d","name":"WLED","inv":"Light"},"nw":{"ins":[{"ssid":"","pskl":0,"ip":[192,168,86,48],"gw":[192,168,86,1],"sn":[255,255,255,0]}]},"ap":{"ssid":"WLED-3D","pskl":0,"chan":1,"hide":0,"behav":0,"ip":[4,3,2,1]},"wifi":{"sleep":false},"eth":{"type":4,"pin":[21,19,22,25,26,27,5,23,18,17]},"hw":{"led":{"total":56,"maxpwr":850,"ledma":55,"cct":false,"cr":false,"cb":0,"fps":42,"rgbwm":3,"ins":[{"start":0,"len":34,"pin":[16],"order":0,"rev":false,"skip":0,"type":22,"ref":false},{"start":34,"len":18,"pin":[32],"order":0,"rev":false,"skip":0,"type":22,"ref":false},{"start":52,"len":1,"pin":[12],"order":0,"rev":false,"skip":0,"type":30,"ref":false},{"start":53,"len":3,"pin":[14],"order":0,"rev":false,"skip":0,"type":30,"ref":false}]},"com":[],"btn":{"max":4,"ins":[{"type":0,"pin":[-1],"macros":[0,0,0]},{"type":0,"pin":[-1],"macros":[0,0,0]},{"type":0,"pin":[-1],"macros":[0,0,0]},{"type":0,"pin":[-1],"macros":[0,0,0]}],"tt":32,"mqtt":false},"ir":{"pin":-1,"type":0,"sel":true},"relay":{"pin":-1,"rev":false},"baud":1152},"light":{"scale-bri":100,"pal-mode":0,"aseg":true,"gc":{"bri":1,"col":2.8},"tr":{"mode":true,"dur":7,"pal":0},"nl":{"mode":1,"dur":60,"tbri":0,"macro":0}},"def":{"ps":1,"on":true,"bri":128},"if":{"sync":{"port0":21324,"port1":65506,"recv":{"bri":true,"col":true,"fx":true,"grp":1,"seg":false,"sb":false},"send":{"dir":false,"btn":false,"va":false,"hue":true,"macro":false,"twice":false,"grp":1}},"nodes":{"list":true,"bcast":true},"live":{"en":true,"port":5568,"mc":false,"dmx":{"uni":1,"seqskip":false,"addr":1,"mode":4},"timeout":25,"maxbri":false,"no-gc":true,"offset":0},"va":{"alexa":false,"macros":[0,0]},"mqtt":{"en":true,"broker":"192.168.86.210","port":1883,"user":"wled","pskl":32,"cid":"WLED-3D","topics":{"device":"wled/wled-3d","group":"wled/all"}},"hue":{"en":false,"id":1,"iv":25,"recv":{"on":true,"bri":true,"col":true},"ip":[192,168,86,0]},"ntp":{"en":false,"host":"0.wled.pool.ntp.org","tz":0,"offset":0,"ampm":false,"ln":0,"lt":0}},"ol":{"clock":0,"cntdwn":false,"min":0,"max":29,"o12pix":0,"o5m":false,"osec":false},"timers":{"cntdwn":{"goal":[20,1,1,0,0,0],"macro":0},"ins":[]},"ota":{"lock":false,"lock-wifi":false,"pskl":7,"aota":true},"um":{}} -------------------------------------------------------------------------------- /guides/GUIDE-axis_limits.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Finding the axis limits](https://github.com/rootiest/zippy_guides/blob/main/guides/axis_limits.md) 23 | -------------------------------------------------------------------------------- /guides/GUIDE-index.md: -------------------------------------------------------------------------------- 1 | Please follow the link below to the zippy_guides repository: 2 | 3 | # [Guides For Klipper Things and Stuff](https://github.com/rootiest/zippy_guides/blob/main/README.md) 4 | -------------------------------------------------------------------------------- /guides/GUIDE-links.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Useful Links](https://github.com/rootiest/zippy_guides/blob/main/guides/links.md) 23 | -------------------------------------------------------------------------------- /guides/GUIDE-macros.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [The Macros](https://github.com/rootiest/zippy_guides/blob/main/guides/macros.md) 23 | -------------------------------------------------------------------------------- /guides/GUIDE-mesh.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Bed Mesh Boundaries](https://github.com/rootiest/zippy_guides/blob/main/guides/mesh.md) 23 | -------------------------------------------------------------------------------- /guides/GUIDE-probe.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Probe Offsets](https://github.com/rootiest/zippy_guides/blob/main/guides/probe.md) 23 | -------------------------------------------------------------------------------- /guides/GUIDE-usb-pico.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Flashing a Pico for USB](https://github.com/rootiest/zippy_guides/blob/main/guides/usb-pico.md) 23 | -------------------------------------------------------------------------------- /guides/GUIDE-variables.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Advanced Macro Techniques](https://github.com/rootiest/zippy_guides/blob/main/guides/variables.md) 23 | -------------------------------------------------------------------------------- /guides/Guide-pico_can.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [CANbus your Pico](https://github.com/rootiest/zippy_guides/blob/main/guides/pico_can.md) 23 | -------------------------------------------------------------------------------- /guides/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | Please follow the link below to the zippy_guides repository: 21 | 22 | # [Guides For Klipper Things and Stuff](https://github.com/rootiest/zippy_guides/blob/main/README.md) 23 | -------------------------------------------------------------------------------- /guides/resources/GET_PROBE_LIMITS.cfg: -------------------------------------------------------------------------------- 1 | # Macro to calculate the probe min/max/current coordinates 2 | 3 | ##########################DEPENDENCIES########################## 4 | # 5 | # This config section is required to output text to the console 6 | # which is used by the macro. If you already have an equivalent 7 | # config section elsewhere, you can comment this one out. 8 | [respond] 9 | # 10 | ################################################################ 11 | 12 | [gcode_macro GET_PROBE_LIMITS] 13 | description: Calculates the probe min/max/current coordinates 14 | gcode: 15 | {% set config = printer.configfile.settings %} 16 | # Find probe config in configfile 17 | {% if config["bltouch"] %} 18 | # bltouch section found 19 | {% set probe = config["bltouch"] %} 20 | {% set has_probe = True %} 21 | {% elif config["probe"] %} 22 | # probe section found 23 | {% set probe = config["probe"] %} 24 | {% set has_probe = True %} 25 | {% elif config["beacon"] %} 26 | # probe section found 27 | {% set probe = config["beacon"] %} 28 | {% set has_probe = True %} 29 | {% elif config["smart_effector"] %} 30 | # smart_effector probe section found 31 | {% set probe = config["smart_effector"] %} 32 | {% set has_probe = True %} 33 | {% else %} 34 | # No probe or bltouch sections found 35 | RESPOND MSG="Failed to detect probe in configfile" 36 | {% endif %} 37 | {% if has_probe %} 38 | {% set stepperx = config["stepper_x"] %} 39 | {% set steppery = config["stepper_y"] %} 40 | {% set xprobemin = stepperx["position_min"]|float + probe["x_offset"]|float %} 41 | {% set xprobemax = stepperx["position_max"]|float + probe["x_offset"]|float %} 42 | {% set yprobemin = steppery["position_min"]|float + probe["y_offset"]|float %} 43 | {% set yprobemax = steppery["position_max"]|float + probe["y_offset"]|float %} 44 | RESPOND MSG="Configured Probe X-Offset {probe.x_offset}" 45 | RESPOND MSG="Configured Probe Y-Offset {probe.y_offset}" 46 | {% if probe.z_offset is defined %} 47 | RESPOND MSG="Configured Probe Z-Offset {probe.z_offset}" 48 | {% elif probe.trigger_distance is defined %} 49 | RESPOND MSG="Configured Probe Trigger Distance {probe.trigger_distance}" 50 | {% endif %} 51 | RESPOND MSG="Minimum PROBE position X={xprobemin} Y={yprobemin}" 52 | RESPOND MSG="Maximum PROBE position X={xprobemax} Y={yprobemax}" 53 | # check if printer homed 54 | {% if "xyz" in printer.toolhead.homed_axes %} 55 | {% set curprobex = printer.toolhead.position.x|float + probe["x_offset"]|float %} 56 | {% set curprobey = printer.toolhead.position.y|float + probe["y_offset"]|float %} 57 | RESPOND MSG="Current PROBE position X={curprobex} Y={curprobey}" 58 | {% endif %} 59 | {% endif %} -------------------------------------------------------------------------------- /guides/resources/PicoCAN-jst.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/PicoCAN-jst.jpg -------------------------------------------------------------------------------- /guides/resources/PicoCAN-trans.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/PicoCAN-trans.jpg -------------------------------------------------------------------------------- /guides/resources/SKRPico-jumpers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/SKRPico-jumpers.png -------------------------------------------------------------------------------- /guides/resources/SKRPico-menuconfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/SKRPico-menuconfig.png -------------------------------------------------------------------------------- /guides/resources/bed_mesh_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/bed_mesh_diagram.png -------------------------------------------------------------------------------- /guides/resources/can-trans-uart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/can-trans-uart.jpg -------------------------------------------------------------------------------- /guides/resources/can-trans.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/can-trans.jpg -------------------------------------------------------------------------------- /guides/resources/first_layer1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/first_layer1.png -------------------------------------------------------------------------------- /guides/resources/first_layer2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/first_layer2.png -------------------------------------------------------------------------------- /guides/resources/first_layer3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/first_layer3.png -------------------------------------------------------------------------------- /guides/resources/offset-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/offset-diagram.png -------------------------------------------------------------------------------- /guides/resources/pretty_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/pretty_header.png -------------------------------------------------------------------------------- /guides/resources/skr-pico_uart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rootiest/zippy-klipper_config/2475c1f01a8ec8c317586868c43cd7c30ee446ff/guides/resources/skr-pico_uart.jpg -------------------------------------------------------------------------------- /ledcontrol.cfg: -------------------------------------------------------------------------------- 1 | ##### 2 | # DO NOT EDIT THIS FILE DIRECTLY 3 | # This file is under version control 4 | # Instead create a new file for your custom macros 5 | ####### 6 | 7 | [gcode_macro SET_LEDCONTROL] 8 | # Usage: 9 | # Select a preset (defined in web interface) by name with: 10 | # 11 | # SET_LEDCONTROL PRESET="my_preset" 12 | # 13 | # or set the pattern and parameters directly for a LED group (default group is "main"): 14 | # 15 | # SET_LEDCONTROL GROUP="main" BRIGHTNESS=0.7 SATURATION=0.5 PATTERN=0 SCALE=0.2 SPEED=0.4 PALETTE=0 16 | # 17 | # You can also set global saturation and brightness (for all LEDs) with: 18 | # SET_LEDCONTROL GLOBAL_BRIGHTNESS=1.0 GLOBAL_SATURATION=1.0 19 | # 20 | # Built-in Patterns: 21 | # 0: Static Color 22 | # 1: Static White 23 | # 2: Static Gradient 1D 24 | # 3: Static Gradient Mirrored 1D 25 | # 6: Twinkle Gradient 1D 26 | # 7: Twinkle White 1D 27 | # 100: Palette Cycle 1D 28 | # 110: Palette Cycle Mirrored 1D 29 | # 112: Palette Cycle Wipe 1D 30 | # 114: Palette Cycle Wipe From Center 1D 31 | # 120: Palette Cycle Quantized 1D 32 | # 130: Palette Cycle Random 1D 33 | # 140: Palette Scan Mirrored 1D 34 | # 141: Palette Bounce Mirrored 1D 35 | # 150: Palette Waves 1D 36 | # 160: Palette Ripples 1D 37 | # 161: Palette Ripples (Fast Cycle) 1D 38 | # 170: Palette Plasma 2D 39 | # 180: Palette Fractal Plasma 2D 40 | # 190: Palette Twinkle 1D 41 | # 200: Palette Perlin Noise 2D 42 | # 210: Palette fBm Noise 2D 43 | # 310: Hue Cycle 1D 44 | # 320: Hue Cycle Quantized 1D 45 | # 330: Hue Scan 1D 46 | # 331: Hue Bounce 1D 47 | # 340: Hue Waves 1D 48 | # 350: Hue Ripples 1D 49 | # 400: RGB Sines 1D 50 | # 410: RGB Cubics 1D 51 | # 420: RGB Ripples 1D 52 | # 430: RGB Plasma (Spectrum Sines) 2D 53 | # 440: RGB Plasma (Fire Sines) 2D 54 | # 450: RGB Fractal Plasma (Fire Sines) 2D 55 | 56 | # Built-in Palettes: 57 | # 0: Malibu 58 | # 20: Miami 59 | # 50: Twilight 1 60 | # 51: Twilight 2 61 | # 60: Tropical 1 62 | # 61: Tropical 2 63 | # 70: Anaglyph 64 | # 80: Lemonbars 65 | # 90: Birefringence 66 | # 100: City Lights 1 67 | # 101: City Lights 2 68 | # 102: City Lights 3 69 | # 200: Sky Blue 70 | # 210: Blurple 71 | # 220: Winter 72 | # 230: Nebula 73 | # 240: Hot Pink 74 | # 250: Light Pink 75 | # 260: Peach 76 | # 270: Summer 77 | # 280: Red Orange 78 | # 290: Golden Hour 79 | # 500: Spectrum 80 | 81 | gcode: 82 | {action_call_remote_method("set_led", 83 | preset = params.PRESET|default(""), 84 | group = params.GROUP|default("main"), 85 | brightness=params.BRIGHTNESS|default(""), 86 | saturation=params.SATURATION|default(""), 87 | pattern=params.PATTERN|default(""), 88 | speed=params.SPEED|default(""), 89 | scale=params.SCALE|default(""), 90 | palette=params.PALETTE|default(""), 91 | global_brightness=params.GLOBAL_BRIGHTNESS|default(""), 92 | global_saturation=params.GLOBAL_SATURATION|default(""), 93 | )} 94 | 95 | -------------------------------------------------------------------------------- /machine/aliases.cfg: -------------------------------------------------------------------------------- 1 | ################################ 2 | ########### Aliases ############ 3 | ################################ 4 | 5 | ######### START_PRINT ########## 6 | [gcode_macro PREP_PRINT] 7 | gcode: 8 | START_PRINT { rawparams } 9 | 10 | [gcode_macro PRINT_START] 11 | gcode: 12 | START_PRINT { rawparams } 13 | 14 | #######@## END_PRINT ########### 15 | [gcode_macro PRINT_END] 16 | gcode: 17 | END_PRINT { rawparams } 18 | 19 | [gcode_macro PRESENT_PRINT] 20 | gcode: 21 | END_PRINT { rawparams } 22 | 23 | ###### HOME_IF_NEEDED ########## 24 | [gcode_macro LAZY_HOME] 25 | gcode: 26 | HOME_IF_NEEDED { rawparams } 27 | 28 | [gcode_macro CHECK_HOME] 29 | gcode: 30 | HOME_IF_NEEDED { rawparams } -------------------------------------------------------------------------------- /machine/bed-board.cfg: -------------------------------------------------------------------------------- 1 | [mcu bed_board] 2 | serial: /dev/serial/by-id/usb-Klipper_rp2040_4150323833373205-if00 3 | 4 | [output_pin _accel_led] 5 | pin: bed_board: gpio25 6 | value: 1 7 | shutdown_value: 0 8 | 9 | [static_digital_output enable_accel_rgb] 10 | pins:bed_board: gpio11 11 | 12 | [adxl345 bed] 13 | cs_pin: bed_board: gpio1 14 | spi_software_sclk_pin: bed_board: gpio2 15 | spi_software_mosi_pin: bed_board: gpio3 16 | spi_software_miso_pin: bed_board: gpio4 -------------------------------------------------------------------------------- /machine/display-board.cfg: -------------------------------------------------------------------------------- 1 | [mcu display_board] 2 | serial: /dev/serial/by-id/usb-Klipper_rp2040_4150323833373008-if00 3 | 4 | [display secondary] 5 | lcd_type: sh1106 6 | i2c_mcu: display_board 7 | i2c_bus: i2c1b 8 | x_offset: 2 9 | display_group: extended_screen 10 | #encoder_pins: ^display_board:gpio1, ^display_board:gpio2 11 | #click_pin: ^!display_board:gpio4 12 | #menu_timeout: 60 13 | 14 | [output_pin _qt_led] 15 | pin: display_board:gpio25 16 | value: 1 17 | shutdown_value: 0 18 | 19 | [static_digital_output enable_rgb] 20 | pins:display_board:gpio11 -------------------------------------------------------------------------------- /machine/host.cfg: -------------------------------------------------------------------------------- 1 | [mcu host] 2 | serial: /tmp/klipper_host_mcu 3 | 4 | [temperature_fan host] 5 | pin: host: gpio26 6 | control: watermark 7 | max_delta: 3.0 8 | shutdown_speed: 1 9 | sensor_type: temperature_host 10 | sensor_path: /sys/class/thermal/thermal_zone0/temp 11 | min_temp: 0 12 | max_temp: 100 13 | target_temp: 50.0 14 | 15 | 16 | #[temperature_fan chamber] 17 | #pin: host: gpio12 18 | #sensor_type: BME280 19 | #i2c_mcu: pi2c 20 | #i2c_bus: i2c1b 21 | #i2c_address: 119 22 | #gcode_id: C 23 | #shutdown_speed: 0.0 24 | #max_power: 1.0 25 | #min_temp: 0 26 | #max_temp: 80 27 | #target_temp: 0.0 28 | #control: watermark 29 | #max_delta: 5.0 -------------------------------------------------------------------------------- /machine/mechanics.cfg: -------------------------------------------------------------------------------- 1 | [printer] 2 | kinematics: cartesian 3 | max_velocity: 500 4 | max_accel: 5000 5 | max_accel_to_decel: 3000 6 | max_z_velocity: 25 7 | max_z_accel: 500 8 | square_corner_velocity: 5.0 9 | 10 | [display_status] 11 | 12 | [exclude_object] 13 | 14 | [sdcard_loop] 15 | 16 | [skew_correction] 17 | 18 | [respond] 19 | 20 | [virtual_sdcard] 21 | path: ~/printer_data/gcodes 22 | on_error_gcode: 23 | CANCEL_PRINT 24 | 25 | [pause_resume] 26 | recover_velocity: 100 27 | 28 | [endstop_phase] 29 | 30 | # Support ArcWelder 31 | [gcode_arcs] 32 | resolution: 0.10 33 | 34 | [firmware_retraction] 35 | retract_length: 0.36 36 | retract_speed: 60 37 | unretract_speed: 60 38 | 39 | [force_move] 40 | enable_force_move: True 41 | 42 | # Allow saving variables to file 43 | [save_variables] 44 | filename: ~/printer_data/config/variables.cfg 45 | 46 | [resonance_tester] 47 | accel_chip_x: adxl345 hotend 48 | accel_chip_y: adxl345 bed 49 | probe_points: 50 | 73, 130, 5 # Centered low 51 | # 164, 136, 50 # Centered above bed 52 | # 20, 20, 5 # Front-Left 53 | # 200, 200, 5 # Back-Right 54 | 55 | [input_shaper] 56 | #shaper_freq_x: 45.4 57 | #shaper_type_x: mzv 58 | #shaper_freq_y: 35.2 59 | #shaper_type_y: mzv 60 | 61 | 62 | 63 | [gcode_macro M808] 64 | gcode: 65 | {% if params.K is not defined and params.L is defined %}SDCARD_LOOP_BEGIN COUNT={params.L|int}{% endif %} 66 | {% if params.K is not defined and params.L is not defined %}SDCARD_LOOP_END{% endif %} 67 | {% if params.K is defined and params.L is not defined %}SDCARD_LOOP_DESIST{% endif %} 68 | 69 | # Initialize some variable defaults 70 | [delayed_gcode macros_initialize] 71 | initial_duration: 1 72 | gcode: 73 | INITIALIZE_VARIABLE VARIABLE=park_x VALUE=-5 74 | INITIALIZE_VARIABLE VARIABLE=park_y VALUE=220 75 | INITIALIZE_VARIABLE VARIABLE=park_z VALUE=150 76 | INITIALIZE_VARIABLE VARIABLE=bowden_len VALUE=25 -------------------------------------------------------------------------------- /machine/mini12864.cfg: -------------------------------------------------------------------------------- 1 | [mcu menu] 2 | # Uncomment serial and update with proper path 3 | # Find serial path by running terminal command: ls /dev/serial/by-id/* 4 | serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_0D0028001343535031303120-if00 5 | #restart_method: rpi_usb 6 | 7 | [display] 8 | lcd_type: uc1701 9 | #kill_pin: menu: PF0 10 | spi_bus: spi1 11 | cs_pin: menu: PA4 12 | a0_pin: menu: PA2 13 | rst_pin: menu: PA3 14 | contrast: 63 15 | encoder_pins: ^menu: PA1, ^menu: PA0 16 | click_pin: ^!menu: PB1 17 | display_group: __voron_display 18 | 19 | #[multi_pin _beepers] 20 | #pins: menu: PF1, !pin_board: gpio22 21 | 22 | [output_pin _beeper] 23 | pin: menu: PF1 24 | pwm: True 25 | value: 0 26 | shutdown_value: 0 27 | cycle_time: 0.001 28 | scale: 1 29 | 30 | # name of neopixel should match name referenced in printer.cfg 31 | # if there are other gcode_macros referencing the led display (e.g delayed gcode_macro) 32 | [neopixel _mini12864_neopixel] 33 | pin: menu: PA13 34 | chain_count: 3 35 | color_order: RGB 36 | initial_RED: 1.0 37 | initial_GREEN: 1.0 38 | initial_BLUE: 1.0 39 | 40 | [led_effect mini12864_printing] 41 | autostart: false 42 | frame_rate: 24 43 | leds: 44 | neopixel:_mini12864_neopixel (1-2) 45 | layers: 46 | #breathing 3 1 top (0,0,.25) 47 | linearfade 3 1 top (0,0,.25),(0.15,0.15,0.15),(0.1,0.1,0.1),(0,0,.15) 48 | 49 | [led_effect mini12864_heating] 50 | autostart: false 51 | frame_rate: 24 52 | leds: 53 | neopixel:_mini12864_neopixel (1-2) 54 | layers: 55 | #breathing 3 1 top (0,0,.25) 56 | linearfade 3 1 top (.25,0,0),(0.15,0.10,0.10),(0.1,0.05,0.05),(.15,0,0) 57 | 58 | [led_effect mini12864_idle] 59 | autostart: false 60 | frame_rate: 24 61 | leds: 62 | neopixel:_mini12864_neopixel (1-2) 63 | layers: 64 | static 0 0 top (.10,.10,.10) -------------------------------------------------------------------------------- /machine/pin-board.cfg: -------------------------------------------------------------------------------- 1 | [mcu pin_board] 2 | serial: /dev/serial/by-id/usb-Klipper_rp2040_E660C062135C6A24-if00 3 | 4 | # Dehumidifier Relay Switch 5 | [output_pin dehumidifier] 6 | pin: pin_board: gpio8 # Relay pin 7 | value: 0 # Startup value -------------------------------------------------------------------------------- /machine/shell_command.cfg: -------------------------------------------------------------------------------- 1 | [gcode_shell_command hello_world] 2 | command: echo hello world 3 | timeout: 2. 4 | verbose: True 5 | [gcode_macro HELLO_WORLD] 6 | gcode: 7 | RUN_SHELL_COMMAND CMD=hello_world 8 | 9 | [gcode_shell_command shutdown_host] 10 | command: shutdown now 11 | 12 | [gcode_shell_command reboot_host] 13 | command: reboot now -------------------------------------------------------------------------------- /machine/toolboard.cfg: -------------------------------------------------------------------------------- 1 | ## SB2040 2 | [mcu sb2040] 3 | canbus_uuid: 282261ad426f 4 | 5 | [temperature_fan toolboard] 6 | # sensor: 7 | sensor_type: temperature_mcu 8 | sensor_mcu: sb2040 9 | min_temp: 0 10 | max_temp: 120 11 | # fan: 12 | target_temp: 0.0 13 | pin: sb2040:gpio15 14 | shutdown_speed: 1 15 | control: pid 16 | pid_kp: 0.5 17 | pid_ki: 0.5 18 | pid_kd: 1.0 19 | pid_deriv_time: 2.0 20 | 21 | [temperature_fan chamber] 22 | # sensor: 23 | sensor_type: ATC Semitec 104GT-2 24 | sensor_pin: sb2040:gpio26 25 | min_temp: -50 26 | max_temp: 350 27 | # fan: 28 | target_temp: 0.0 29 | pin: host: gpio12 30 | gcode_id: C 31 | shutdown_speed: 0.0 32 | max_power: 1.0 33 | control: watermark 34 | max_delta: 5.0 35 | 36 | ## FAN0 Part-cooling Fan 37 | [fan] 38 | pin: sb2040:gpio13 39 | 40 | ## FAN1 Hotend Fan 41 | [heater_fan hotend_fan] 42 | pin: sb2040:gpio14 43 | heater: extruder 44 | heater_temp: 60.0 45 | 46 | ## FAN2 Toolboard fan 47 | # [fan_generic fan] 48 | # pin: sb2040:gpio15 49 | 50 | #[stepper_x] 51 | #endstop_pin: !sb2040:gpio29 52 | ## SB2040 endstops:gpio28 and gpio29,gpio25 is HV 53 | 54 | ## Extruder 55 | [extruder] 56 | step_pin: sb2040:gpio9 57 | dir_pin: !sb2040:gpio10 58 | enable_pin: !sb2040:gpio7 59 | heater_pin: sb2040:gpio6 60 | sensor_pin: sb2040:gpio27 61 | rotation_distance: 22.6789511 62 | #rotation_distance: 22.48094064725844 63 | microsteps: 16 64 | full_steps_per_rotation: 200 65 | gear_ratio: 50:10 66 | nozzle_diameter: 0.400 67 | filament_diameter: 1.750 68 | max_extrude_cross_section: 5 69 | max_extrude_only_distance: 1100 70 | min_extrude_temp: 180 71 | pressure_advance = 0.035 72 | pressure_advance_smooth_time: 0.040 73 | min_temp: 0 74 | max_temp: 350 75 | sensor_type: PT1000 76 | pullup_resistor: 1000 77 | smooth_time: 0.9 78 | 79 | [tmc2209 extruder] 80 | uart_pin: sb2040:gpio8 81 | run_current: 0.350 82 | stealthchop_threshold: 999999 83 | 84 | 85 | ## RGB 86 | [neopixel _sb_leds] 87 | pin: sb2040:gpio12 88 | chain_count: 10 89 | color_order: GRB 90 | #color_order: GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRB, GRBW, GRBW 91 | initial_RED: 0.5 92 | initial_GREEN: 0.5 93 | initial_BLUE: 0.5 94 | initial_WHITE: 0.5 95 | 96 | ## ADXL345 97 | [adxl345 hotend] 98 | cs_pin: sb2040:gpio1 99 | spi_software_sclk_pin: sb2040:gpio0 100 | spi_software_mosi_pin: sb2040:gpio3 101 | spi_software_miso_pin: sb2040:gpio2 102 | -------------------------------------------------------------------------------- /machine/zippy.cfg: -------------------------------------------------------------------------------- 1 | # Additional ZippyPrint Configuration 2 | 3 | # Macros directory 4 | [include ../macros/*.cfg] 5 | 6 | # Led Control 7 | [include ../ledcontrol.cfg] 8 | 9 | # Timelapse 10 | [include ../timelapse.cfg] 11 | 12 | # Adaptive mesh and purge 13 | [include ../Adaptive_Mesh.cfg] 14 | [include ../Adaptive_Purge.cfg] 15 | 16 | # Klicky Probe 17 | [include ../probe/klicky-probe.cfg] 18 | 19 | # CRTouch Probe 20 | #[include ../probe/crtouch-probe.cfg] 21 | 22 | [esp32_webscale] 23 | ip: 192.168.86.25 24 | 25 | # Silence output 26 | [gcode_macro M116] 27 | description: Silent status feedback 28 | gcode: 29 | 30 | # Dual output 31 | [gcode_macro M1187] 32 | description: Dual status feedback 33 | gcode: 34 | M117 {rawparams} 35 | M118 {rawparams} 36 | [gcode_macro M1178] 37 | gcode: 38 | M1187 {rawparams} 39 | 40 | # Dev Testing macros 41 | [gcode_macro _TEST_EXTRUDER] 42 | gcode: 43 | {% if printer.toolhead.extruder == "extruder" %} M118 {printer.toolhead.extruder} 44 | {% endif %} 45 | 46 | [gcode_macro _TEST_MESH] 47 | gcode: 48 | {% set bed_mesh = printer.bed_mesh %} 49 | RESPOND MSG="Bed Mesh Profile: "{bed_mesh.profile_name} 50 | RESPOND MSG="Bed Mesh Min: {bed_mesh.mesh_min}" 51 | RESPOND MSG="Bed Mesh Max: {bed_mesh.mesh_max}" 52 | RESPOND MSG="Probe Matrix: {bed_mesh.probed_matrix}" 53 | RESPOND MSG="Mesh Matrix: {bed_mesh.mesh_matrix}" -------------------------------------------------------------------------------- /macros/ADXL_SHAPER.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro ADXL_SHAPE_ALL] 2 | description: Test resonances for both axis 3 | gcode: 4 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 5 | HOME_IF_NEEDED 6 | SHAPER_CALIBRATE AXIS=x 7 | SHAPER_CALIBRATE AXIS=y 8 | RUN_SHELL_COMMAND CMD=adxl_shape_x 9 | RUN_SHELL_COMMAND CMD=adxl_shape_y 10 | M118 Test done 11 | SAVE_AND_RESTART 12 | 13 | [gcode_macro ADXL_SHAPE_X] 14 | description: Test resonances for X axis 15 | gcode: 16 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 17 | HOME_IF_NEEDED 18 | SHAPER_CALIBRATE AXIS=x 19 | RUN_SHELL_COMMAND CMD=adxl_shape_x 20 | M118 Test done 21 | SAVE_AND_RESTART 22 | 23 | [gcode_macro ADXL_SHAPE_Y] 24 | description: Test resonances for Y axis 25 | gcode: 26 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 27 | HOME_IF_NEEDED 28 | SHAPER_CALIBRATE AXIS=y 29 | RUN_SHELL_COMMAND CMD=adxl_shape_y 30 | M118 Test done 31 | SAVE_AND_RESTART 32 | 33 | [gcode_shell_command adxl_shape_x] 34 | command: sh ~/printer_data/config/shaper/adxl_shape_x.sh # edit: ´/macro/shell_commands/´ to where your .sh file lays 35 | timeout: 60. 36 | verbose: True 37 | 38 | [gcode_shell_command adxl_shape_y] 39 | command: sh ~/printer_data/config/shaper/adxl_shape_y.sh # edit: ´/macro/shell_commands/´ to where your .sh file lays 40 | timeout: 60. 41 | verbose: True 42 | 43 | ### name file: adxl_shape_x.sh 44 | #~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_x_*.csv -o ~/printer_data/config/shaper_calibrate_x.png 45 | 46 | ### name file: adxl_shape_y.sh 47 | #~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_y_*.csv -o ~/printer_data/config/shaper_calibrate_y.png 48 | -------------------------------------------------------------------------------- /macros/ALERT_BEEP.cfg: -------------------------------------------------------------------------------- 1 | [delayed_gcode alert_beeper] 2 | gcode: 3 | change_tune 4 | UPDATE_DELAYED_GCODE ID=alert_beeper DURATION=5 5 | 6 | [gcode_macro ALERT_BEEP_ON] 7 | gcode: 8 | UPDATE_DELAYED_GCODE ID=alert_beeper DURATION=1 9 | 10 | [gcode_macro ALERT_BEEP_OFF] 11 | gcode: 12 | UPDATE_DELAYED_GCODE ID=alert_beeper DURATION=0 -------------------------------------------------------------------------------- /macros/BED_PREP.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Bed Preparation # 3 | # Version 1.1 2023-2-12 # 4 | ##################################### 5 | 6 | # This macro performs homing, z_tilt, 7 | # and meshing for a docking probe. 8 | 9 | ################################ 10 | ########### BED_PREP ########### 11 | ################################ 12 | [gcode_macro BED_PREP] 13 | variable_output: 118 14 | gcode: 15 | {% if params.TARGET is defined %} 16 | {% set TARGET = params.TARGET|default(100)|float %} 17 | M{output} {"Heating bed to %.1f" % TARGET} 18 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={TARGET} 19 | TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={TARGET} MAXIMUM={TARGET+1} 20 | {% endif %} 21 | M{output} Homing Z 22 | G28 Z PROBE_LOCK ; home Z axis 23 | M{output} Calibrating Z 24 | STATUS_CALIBRATING_Z 25 | Z_TILT_ADJUST ; adjust z-tilt 26 | M{output} Meshing print area 27 | BED_MESH_CALIBRATE 28 | {% if params.TARGET is defined %} 29 | {% if params.HOLD is not defined %} 30 | M{output} Cooling bed 31 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 32 | {% else %} 33 | {% set HOLD = params.HOLD|default('false')|lower %} 34 | {% if HOLD == 'true' %} 35 | M{output} {"Leaving bed at %.1f" % TARGET} 36 | {% else %} 37 | M{output} Cooling bed 38 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 39 | {% endif %} 40 | {% endif %} 41 | {% else %} 42 | {% if params.HOLD is defined %} 43 | {% set HOLD = params.HOLD|default('false')|lower %} 44 | {% if HOLD == 'true' %} 45 | M{output} No target to hold 46 | {% endif %} 47 | {% endif %} 48 | {% endif %} 49 | M{output} Docking Probe 50 | Dock_Probe_Unlock ; dock probe 51 | M{output} Ready -------------------------------------------------------------------------------- /macros/BEGIN_LAYER.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro BEGIN_LAYER] 2 | description: Start a new layer and notify system 3 | gcode: 4 | {% set printcfg = printer['gcode_macro _printcfg'] %} 5 | #Get layer details from Slicer GCode 6 | {% set CUR_LAYER = params.NUM|default(printcfg.layer_num)|int + 1 %} 7 | {% set NUM_LAYERS = params.COUNT|default(printcfg.layer_count)|int %} 8 | {% set LAYER_Z = params.ZLAY|default(printcfg.layer_z)|float %} 9 | #Get filament details from Slicer GCode 10 | {% set FILAMENT = params.FILAMENT|default(printcfg.material_type) %} 11 | {% set COLOUR = params.COLOUR|default(printcfg.material_color) %} 12 | 13 | SET_PRINT_STATS_INFO TOTAL_LAYER={NUM_LAYERS} CURRENT_LAYER={CUR_LAYER} 14 | 15 | SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=cur_layer VALUE={CUR_LAYER} 16 | SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=num_layers VALUE={NUM_LAYERS} 17 | SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=layer_z VALUE={LAYER_Z} 18 | SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=filament VALUE="'{FILAMENT}'" 19 | SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=colour VALUE="'{COLOUR}'" 20 | -------------------------------------------------------------------------------- /macros/CANCEL_PRINT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro CANCEL_PRINT] 2 | description: Cancel the actual running print 3 | rename_existing: CANCEL_PRINT_BASE 4 | variable_park: True 5 | gcode: 6 | M117 Print Canceled 7 | STATUS_ERROR 8 | ## Move head and retract only if not already in the pause state and park set to true 9 | {% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%} 10 | {% if printer.toolhead.homed_axes == "xyz" %} 11 | _TOOLHEAD_PARK_PAUSE_CANCEL 12 | {% endif %} 13 | {% endif %} 14 | game_over_tune 15 | TURN_OFF_HEATERS 16 | CANCEL_PRINT_BASE -------------------------------------------------------------------------------- /macros/CHAMBER_TEMP.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Chamber Temperatures # 3 | # Version 1.0 2023-1-30 # 4 | ##################################### 5 | 6 | ################################ 7 | ############# M141 ############# 8 | ################################ 9 | 10 | # USAGE: M141 S 11 | 12 | # Set the variables below to define your chamber sensor 13 | # type and name. The output variable defines the method 14 | # by which status updates are sent. 15 | 16 | [gcode_macro M141] 17 | description: Set the chamber temperature 18 | variable_chamber_name: 'chamber' 19 | variable_chamber_type: 'temperature_fan' 20 | variable_output: 118 21 | gcode: 22 | # Parameters 23 | {% set targ = params.S|default(0)|float %} 24 | # chamber sensor alias 25 | {% set chamber = chamber_type + ' ' + chamber_name %} 26 | # chamber temperature alias 27 | {% set temp = printer[chamber].temperature %} 28 | # chamber target status 29 | M{output} Chamber Target: {targ} 30 | # current chamber temp 31 | M{output} Chamber Temperature: {temp} 32 | {% if chamber_type == 'temperature_fan' %} 33 | # Temperature Fan 34 | SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN={chamber_name} TARGET={targ} 35 | {% elif chamber_type == 'heater' %} 36 | # Active Heater 37 | SET_HEATER_TEMPERATURE HEATER={chamber_name} TARGET={targ} 38 | {% endif %} 39 | 40 | 41 | ################################ 42 | ############# M191 ############# 43 | ################################ 44 | 45 | # USAGE: M191 S 46 | 47 | # The fuzz variable defines how much above or below the target 48 | # temp is considered acceptable for the wait command to complete. 49 | 50 | [gcode_macro M191] 51 | description: Set and wait for the chamber temperature 52 | variable_fuzz: 5 53 | gcode: 54 | # Variables from M141 55 | {% set m141 = printer["gcode_macro M141"] %} 56 | # Parameters 57 | {% set targ = params.S|default(0)|float %} 58 | # chamber sensor alias 59 | {% set chamber = m141.chamber_type + ' ' + m141.chamber_name %} 60 | # chamber temperature alias 61 | {% set temp = printer[chamber].temperature %} 62 | # Set target temp 63 | M141 {rawparams} 64 | # Wait for target to be reached 65 | TEMPERATURE_WAIT SENSOR={chamber} MINIMUM={targ-fuzz} MAXIMUM={targ+fuzz} 66 | # Complete 67 | M{141.output} Chamber Target Reached: {temp} at {targ} -------------------------------------------------------------------------------- /macros/CLEAN_NOZZLE.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Nozzle Clean Macro # 3 | # Version 1.5 2023-1-31 # 4 | ##################################### 5 | # This Is My Personal Config 6 | # 7 | # Use this instead: 8 | # https://github.com/rootiest/zippy-klipper_config/blob/master/extras/CLEAN_NOZZLE.cfg 9 | 10 | ################################ 11 | ######### CLEAN_NOZZLE ######### 12 | ################################ 13 | [gcode_macro CLEAN_NOZZLE] 14 | gcode: 15 | {% set printcfg = printer['gcode_macro _printcfg'] %} 16 | {% set nozzle_targ = params.TARGET|default(0)|float %} 17 | {% set t = printer.toolhead.extruder %} 18 | {% set is_hot = params.HOT|default(printcfg.clean_hot|string) %} 19 | HOME_IF_NEEDED 20 | {% if is_hot|lower == "false" %} 21 | {% if printcfg.led_status == True %} 22 | {printcfg.status_heat} 23 | {% endif %} 24 | M{printcfg.output} Heating extruder.. 25 | {% if nozzle_targ > 0 %} 26 | SET_HEATER_TEMPERATURE HEATER={t} TARGET={nozzle_targ} 27 | TEMPERATURE_WAIT SENSOR={t} MINIMUM={nozzle_targ} 28 | {% elif printcfg.clean_temp > 0 %} 29 | SET_HEATER_TEMPERATURE HEATER={t} TARGET={printcfg.clean_temp} 30 | TEMPERATURE_WAIT SENSOR={t} MINIMUM={printcfg.clean_temp} 31 | {% endif %} 32 | {% endif %} 33 | G90 ; absolute positioning 34 | ## Move nozzle to start position 35 | G1 X{printcfg.clean_x} Y{printcfg.clean_y} F6000 36 | G1 Z{printcfg.clean_z} F1500 37 | # Set lighting 38 | {% if printcfg.led_status == True %} 39 | {printcfg.status_clean} 40 | {% endif %} 41 | ## Wipe nozzle 42 | M{printcfg.output} Wiping nozzle.. 43 | {% for wipes in range(1, (printcfg.clean_wipe_qty + 1)) %} 44 | {% if printcfg.clean_wipe_axis|lower == 'x' %} 45 | G1 X{printcfg.clean_x + printcfg.clean_wipe_dist} F{printcfg.clean_wipe_spd * 60} 46 | G1 X{printcfg.clean_x} F{printcfg.clean_wipe_spd * 60} 47 | {% elif printcfg.clean_wipe_axis|lower == 'y' %} 48 | G1 Y{printcfg.clean_y + printcfg.clean_wipe_dist} F{printcfg.clean_wipe_spd * 60} 49 | G1 Y{printcfg.clean_y} F{printcfg.clean_wipe_spd * 60} 50 | {% else %} 51 | M{printcfg.output} INVALID WIPE AXIS CONFIGURATION 52 | {% endif %} 53 | {% endfor %} 54 | ## Raise nozzle 55 | G1 Z{printcfg.clean_raise_dist} 56 | {% if is_hot|lower == "false" %} 57 | M{printcfg.output} Cooling extruder.. 58 | SET_HEATER_TEMPERATURE HEATER={t} TARGET=0 59 | {% endif %} 60 | # Set lighting 61 | {% if printcfg.led_status == True %} 62 | {printcfg.status_ready} 63 | {% endif %} -------------------------------------------------------------------------------- /macros/COMPARE_VALUES.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro COMPARE_VALUES] 2 | description: Compare two values 3 | gcode: 4 | {% set VALUE_A = params.A|default(0)|float %} 5 | {% set VALUE_B = params.B|default(0)|float %} 6 | 7 | {% if VALUE_A < (VALUE_B - 3) or VALUE_A > (VALUE_B + 3) %} 8 | M118 False 9 | {% else %} 10 | M118 True 11 | {% endif %} -------------------------------------------------------------------------------- /macros/G27.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro G27] 2 | gcode: 3 | {% set default_x = printer.toolhead.axis_minimum.x + 10 %} 4 | {% set default_y = printer.toolhead.axis_maximum.y %} 5 | 6 | {% if 'save_variables' in printer %} 7 | {% set svv = printer.save_variables.variables %} 8 | {% if 'park_x' in svv %} 9 | {% set default_x = svv.park_x %} 10 | {% endif %} 11 | {% if 'park_y' in svv %} 12 | {% set default_y = svv.park_y %} 13 | {% endif %} 14 | {% endif %} 15 | 16 | {% set x = params.X|default(default_x)|float %} 17 | {% set y = params.Y|default(default_y)|float %} 18 | {% set z = params.Z|default(20)|float %} 19 | 20 | {% if printer.toolhead.homed_axes != "xyz" %} 21 | {action_respond_info("Please home XYZ first")} 22 | {% else %} 23 | SAVE_GCODE_STATE NAME=G27_state 24 | G91 25 | G1 Z{z} 26 | G90 27 | G1 X{x} Y{y} F3000 28 | RESTORE_GCODE_STATE NAME=G27_state MOVE=0 29 | {% endif %} 30 | -------------------------------------------------------------------------------- /macros/G29.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro G29] 2 | gcode: 3 | {% set t = params.T|default(0)|float %} 4 | 5 | {% if printer.idle_timeout.state == "Printing" %} 6 | {action_respond_info("This command cannot be used while printing")} 7 | {% elif printer.toolhead.homed_axes != "xyz" %} 8 | {action_respond_info("Please home XYZ first")} 9 | {% else %} 10 | SAVE_GCODE_STATE NAME=G29_state 11 | G90 12 | G1 Z10 F240 13 | {% if t > 30.0 %} 14 | #M190 S{t} 15 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={t} 16 | TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={t} MAXIMUM={t+1} 17 | {% endif %} 18 | M117 Calibrating Mesh 19 | BED_MESH_CALIBRATE 20 | {% if 'S' in params %} 21 | #M140 S{params.S} 22 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.S+1} 23 | {% endif %} 24 | G90 25 | G1 Z10 F240 26 | G1 X150 Y155 F6000 27 | RESTORE_GCODE_STATE NAME=G29_state MOVE=0 28 | {% endif %} 29 | -------------------------------------------------------------------------------- /macros/GCODE_TTS.cfg: -------------------------------------------------------------------------------- 1 | [gcode_shell_command tts] 2 | command: espeak -ven+m3 3 | timeout: 3. 4 | verbose: False 5 | 6 | [gcode_macro _test_tts] 7 | gcode: 8 | RUN_SHELL_COMMAND CMD=tts PARAMS="'Print Complete'" 9 | 10 | [gcode_macro speak_tts] 11 | gcode: 12 | {% set TEXT = params.TEXT %} 13 | RUN_SHELL_COMMAND CMD=tts PARAMS="'{TEXT}'" 14 | 15 | 16 | [gcode_shell_command aplay] 17 | command: aplay 18 | timeout: 3. 19 | verbose: True 20 | 21 | [gcode_macro _test_mp3] 22 | gcode: 23 | RUN_SHELL_COMMAND CMD=aplay PARAMS=/home/pi/printer_data/config/audio/beep.wav -------------------------------------------------------------------------------- /macros/GET_PROBE_LIMITS.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro GET_PROBE_LIMITS] 2 | description: Calculates the probe min/max/current coordinates 3 | gcode: 4 | {% set config = printer.configfile.settings %} 5 | # Find probe config in configfile 6 | {% if config["bltouch"] %} 7 | # bltouch section found 8 | {% set probe = config["bltouch"] %} 9 | {% set has_probe = True %} 10 | {% elif config["probe"] %} 11 | # probe section found 12 | {% set probe = config["probe"] %} 13 | {% set has_probe = True %} 14 | {% elif config["beacon"] %} 15 | # probe section found 16 | {% set probe = config["beacon"] %} 17 | {% set has_probe = True %} 18 | {% elif config["smart_effector"] %} 19 | # smart_effector probe section found 20 | {% set probe = config["smart_effector"] %} 21 | {% set has_probe = True %} 22 | {% else %} 23 | # No probe or bltouch sections found 24 | RESPOND MSG="Failed to detect probe in configfile" 25 | {% endif %} 26 | {% if has_probe %} 27 | {% set stepperx = config["stepper_x"] %} 28 | {% set steppery = config["stepper_y"] %} 29 | {% set xprobemin = stepperx["position_min"]|float + probe["x_offset"]|float %} 30 | {% set xprobemax = stepperx["position_max"]|float + probe["x_offset"]|float %} 31 | {% set yprobemin = steppery["position_min"]|float + probe["y_offset"]|float %} 32 | {% set yprobemax = steppery["position_max"]|float + probe["y_offset"]|float %} 33 | RESPOND MSG="Configured Probe X-Offset {probe.x_offset}" 34 | RESPOND MSG="Configured Probe Y-Offset {probe.y_offset}" 35 | {% if probe.z_offset is defined %} 36 | RESPOND MSG="Configured Probe Z-Offset {probe.z_offset}" 37 | {% elif probe.trigger_distance is defined %} 38 | RESPOND MSG="Configured Probe Trigger Distance {probe.trigger_distance}" 39 | {% endif %} 40 | RESPOND MSG="Minimum PROBE position X={xprobemin} Y={yprobemin}" 41 | RESPOND MSG="Maximum PROBE position X={xprobemax} Y={yprobemax}" 42 | # check if printer homed 43 | {% if "xyz" in printer.toolhead.homed_axes %} 44 | {% set curprobex = printer.toolhead.position.x|float + probe["x_offset"]|float %} 45 | {% set curprobey = printer.toolhead.position.y|float + probe["y_offset"]|float %} 46 | RESPOND MSG="Current PROBE position X={curprobex} Y={curprobey}" 47 | {% endif %} 48 | {% endif %} 49 | -------------------------------------------------------------------------------- /macros/GO_HOME.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro GO_HOME] 2 | gcode: 3 | G1 X{printer.configfile.config.stepper_x.position_endstop} Y{printer.configfile.config.stepper_y.position_endstop} -------------------------------------------------------------------------------- /macros/INITIALIZE_VARIABLE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro INITIALIZE_VARIABLE] 2 | gcode: 3 | {% if 'VARIABLE' not in params %} 4 | {action_respond_info("Missing VARIABLE parameter")} 5 | {% elif 'VALUE' not in params %} 6 | {action_respond_info("Missing VALUE parameter")} 7 | {% else %} 8 | {% set svv = printer.save_variables.variables %} 9 | {% if params.VARIABLE not in svv %} 10 | {% set escaped = params.VALUE|replace("\"", "\\\"") %} 11 | SAVE_VARIABLE VARIABLE={params.VARIABLE} VALUE="{escaped}" 12 | {% endif %} 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /macros/LEVEL_BED_NOW.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro LEVEL_BED_NOW] 2 | description: Levels the bed 3 | gcode: 4 | M117 Homing axis 5 | G29 -------------------------------------------------------------------------------- /macros/M17.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M17] 2 | gcode: 3 | {% if 'X' in params %} 4 | SET_STEPPER_ENABLE STEPPER=stepper_x ENABLE=1 5 | {% endif %} 6 | {% if 'Y' in params %} 7 | SET_STEPPER_ENABLE STEPPER=stepper_y ENABLE=1 8 | {% endif %} 9 | {% if 'Z' in params %} 10 | SET_STEPPER_ENABLE STEPPER=stepper_z ENABLE=1 11 | # If you have dual Z drivers: 12 | SET_STEPPER_ENABLE STEPPER=stepper_z1 ENABLE=1 13 | {% endif %} 14 | {% if 'E' in params %} 15 | SET_STEPPER_ENABLE STEPPER=extruder ENABLE=1 16 | {% endif %} -------------------------------------------------------------------------------- /macros/M204.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M204] 2 | rename_existing: M204.1 3 | gcode: 4 | {% set f = params.F|default(0.5)|float %} 5 | 6 | {% if 'S' in params %} 7 | {% set s = params.S|float %} 8 | SET_VELOCITY_LIMIT ACCEL={s} ACCEL_TO_DECEL={ s * f } 9 | {% else %} 10 | {% if 'P' in params %} 11 | {% set p = params.P|float %} 12 | {% if 'T' in params %} 13 | {% set t = params.T|float %} 14 | {% if p < t %} 15 | SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f } 16 | {% else %} 17 | SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f } 18 | {% endif %} 19 | {% else %} 20 | SET_VELOCITY_LIMIT ACCEL={p} ACCEL_TO_DECEL={ p * f } 21 | {% endif %} 22 | {% elif 'T' in params %} 23 | {% set t = params.T|float %} 24 | SET_VELOCITY_LIMIT ACCEL={t} ACCEL_TO_DECEL={ t * f } 25 | {% endif %} 26 | {% endif %} 27 | -------------------------------------------------------------------------------- /macros/M205.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M205] 2 | gcode: 3 | {% if 'X' in params %} 4 | SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.X} 5 | {% elif 'Y' in params %} 6 | SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY={params.Y} 7 | {% endif %} 8 | -------------------------------------------------------------------------------- /macros/M300.cfg: -------------------------------------------------------------------------------- 1 | 2 | # Used for beep tones 3 | [gcode_macro M300] 4 | gcode: 5 | {% set S = params.S|default(1000)|int %} ; S sets the tone frequency 6 | {% set P = params.P|default(100)|int %} ; P sets the tone duration 7 | {% set L = 0.5 %} ; L varies the PWM on time, close to 0 or 1 the tone gets a bit quieter. 0.5 is a symmetric waveform 8 | {% if S <= 0 %} ; dont divide through zero 9 | {% set F = 1 %} 10 | {% set L = 0 %} 11 | {% elif S >= 10000 %} ;max frequency set to 10kHz 12 | {% set F = 0 %} 13 | {% else %} 14 | {% set F = 1/S %} ;convert frequency to seconds 15 | {% endif %} 16 | SET_PIN PIN=_beeper VALUE={L} CYCLE_TIME={F} ;Play tone 17 | G4 P{P} ;tone duration 18 | SET_PIN PIN=_beeper VALUE=0 -------------------------------------------------------------------------------- /macros/M420.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M420] 2 | description: Load the current mesh 3 | gcode: 4 | BED_MESH_PROFILE LOAD=default -------------------------------------------------------------------------------- /macros/M73.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M73] 2 | rename_existing: M73.1 3 | gcode: 4 | 5 | {% set NUM_LAYERS = printer["gcode_macro START_PRINT"].num_layers %} 6 | {% set CUR_LAYER = printer["gcode_macro START_PRINT"].cur_layer %} 7 | {% set TOOL_CHANGES = printer["gcode_macro START_PRINT"].tool_changes %} 8 | {% set CUR_TOOL = printer["gcode_macro START_PRINT"].cur_tool %} 9 | 10 | {% if params.C %} 11 | {% set CUR_TOOL = params.C|default(0)|int %} 12 | M118 Tool {CUR_TOOL} of {TOOL_CHANGES} 13 | M118 { "%02d:%02d" % (params.C|int // 60, (params.C|int) % 60) } remaining Layer {CUR_LAYER|int} of {NUM_LAYERS|int} 14 | M117 { "%02d:%02d" % (params.C|int // 60, (params.C|int) % 60) } remaining Layer {CUR_LAYER|int} of {NUM_LAYERS|int} 15 | {% elif params.R %} 16 | M117 { "%02d:%02d" % (params.R|int // 60, (params.R|int) % 60) } remaining Layer {CUR_LAYER|int} of {NUM_LAYERS|int} 17 | {% elif params.S %} 18 | M117 { "%02d:%02d" % (params.S|int // 60, (params.S|int) % 60) } remaining Layer {CUR_LAYER|int} of {NUM_LAYERS|int} 19 | {% else %} 20 | M117 { rawparams } 21 | {% endif %} 22 | M73.1 {rawparams} -------------------------------------------------------------------------------- /macros/M900.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro M900] 2 | gcode: 3 | {% if 'K' in params %} 4 | {% if 'E' in params %} 5 | SET_PRESSURE_ADVANCE EXTRUDER={params.E} ADVANCE={params.K} 6 | {% else %} 7 | SET_PRESSURE_ADVANCE ADVANCE={params.K} 8 | {% endif %} 9 | {% endif %} 10 | -------------------------------------------------------------------------------- /macros/MAINTENANCE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro MAINTENANCE] 2 | # 3 | # MAINTENANCE 4 | # 5 | # Move the toolhead to 1/2 max above the bed and the front centre 6 | # 7 | description: move the toolhead to a convenient position for working on it 8 | gcode: 9 | 10 | {% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %} 11 | {% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %} 12 | 13 | {% set mid_x = max_x / 2.0 %} 14 | {% set z50 = max_z * 0.5 %} 15 | 16 | STATUS_BUSY 17 | HOME_IF_NEEDED 18 | G0 X{mid_x} Y0 Z{z50} F3000 19 | STATUS_READY -------------------------------------------------------------------------------- /macros/MESH_CHECK.cfg: -------------------------------------------------------------------------------- 1 | ################################ 2 | ######### MESH_CHECK ########### 3 | ################################ 4 | 5 | [gcode_macro MESH_CHECK] 6 | description: Checks if a mesh exists to determine whether to create a new one 7 | gcode: 8 | {% if printer.bed_mesh.profiles['default'] is defined %} 9 | BED_MESH_PROFILE LOAD='default' ; load mesh 10 | {% else %} 11 | BED_MESH_CALIBRATE ; generate new mesh 12 | {% endif %} -------------------------------------------------------------------------------- /macros/MOVE_PERCENT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro MOVE_PERCENT] 2 | description: Move toolhead in absolute percentage terms (0 to 1) 3 | gcode: 4 | {% set ns = namespace(hasErrors = False, command = 'G0') %} 5 | 6 | {% for param, value in params.items() %} 7 | {% set value = value|float %} 8 | {% if param == 'F'%} 9 | {% set ns.command = ns.command ~ ' ' ~ param ~ value|string %} 10 | {% else %} 11 | {% set axis = param|lower %} 12 | {% if value <0 or value > 1.0 %} 13 | {% set ns.hasErrors = True %} 14 | RESPOND TYPE=error MSG="{param} out of range [0, 1.0]" 15 | {% endif %} 16 | {% set ns.command = ns.command ~ ' ' ~ param ~ (value * printer.toolhead.axis_maximum[axis]|float)|string %} 17 | {% endif %} 18 | {% endfor %} 19 | 20 | {% if not ns.hasErrors %} 21 | SAVE_GCODE_STATE NAME=move_percent_state 22 | G90 23 | {ns.command} 24 | RESTORE_GCODE_STATE NAME=move_percent_state 25 | {% endif %} -------------------------------------------------------------------------------- /macros/NOTIFY.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro NOTIFY] 2 | gcode: 3 | {% if 'MSG' in params %} 4 | RESPOND TYPE=command MSG="action:notification {params.MSG}" 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /macros/PARKING.cfg: -------------------------------------------------------------------------------- 1 | # Park front center 2 | [gcode_macro PARKFRONT] 3 | gcode: 4 | HOME_IF_NEEDED ; home if not already homed 5 | SAVE_GCODE_STATE NAME=PARKFRONT 6 | G90 ; absolute positioning 7 | G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} Z{printer.toolhead.axis_maximum.z/2} F6000 8 | RESTORE_GCODE_STATE NAME=PARKFRONT 9 | 10 | # Park front center, but low down. 11 | [gcode_macro PARKFRONTLOW] 12 | gcode: 13 | HOME_IF_NEEDED ; home if not already homed 14 | SAVE_GCODE_STATE NAME=PARKFRONT 15 | G90 ; absolute positioning 16 | G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} Z20 F6000 17 | RESTORE_GCODE_STATE NAME=PARKFRONT 18 | 19 | # Park top rear left 20 | [gcode_macro PARKREAR] 21 | gcode: 22 | HOME_IF_NEEDED ; home if not already homed 23 | SAVE_GCODE_STATE NAME=PARKREAR 24 | G90 ; absolute positioning 25 | G0 X{printer.toolhead.axis_minimum.x+10} Y{printer.toolhead.axis_maximum.y-10} Z{printer.toolhead.axis_maximum.z-50} F6000 26 | RESTORE_GCODE_STATE NAME=PARKREAR 27 | 28 | [gcode_macro PARKREARCENTER] 29 | gcode: 30 | HOME_IF_NEEDED ; home if not already homed 31 | SAVE_GCODE_STATE NAME=PARKREARCENTER 32 | G90 ; absolute positioning 33 | G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y-10} Z{printer.toolhead.axis_maximum.z-50} F6000 34 | RESTORE_GCODE_STATE NAME=PARKREARCENTER 35 | 36 | # Park at center of build volume 37 | [gcode_macro PARKCENTER] 38 | gcode: 39 | HOME_IF_NEEDED ; home if not already homed 40 | SAVE_GCODE_STATE NAME=PARKCENTER 41 | G90 ; absolute positioning 42 | G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y/2} Z{printer.toolhead.axis_maximum.z/2} F6000 43 | RESTORE_GCODE_STATE NAME=PARKCENTER 44 | 45 | # Park 15mm above center of bed 46 | [gcode_macro PARKBED] 47 | gcode: 48 | HOME_IF_NEEDED ; home if not already homed 49 | SAVE_GCODE_STATE NAME=PARKBED 50 | G90 ; absolute positioning 51 | G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y/2} Z15 F6000 52 | RESTORE_GCODE_STATE NAME=PARKBED 53 | 54 | # Park 50mm above center of bed 55 | [gcode_macro PARKBED_MID] 56 | gcode: 57 | HOME_IF_NEEDED ; home if not already homed 58 | SAVE_GCODE_STATE NAME=PARKBED 59 | G90 ; absolute positioning 60 | G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y/2} Z50 F6000 61 | RESTORE_GCODE_STATE NAME=PARKBED -------------------------------------------------------------------------------- /macros/PAUSE_PARK.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro PAUSE_PARK] 2 | gcode: 3 | {% set default_x = printer.toolhead.axis_minimum.x + 5 %} 4 | {% set default_y = printer.toolhead.axis_maximum.y %} 5 | 6 | {% if 'save_variables' in printer %} 7 | {% set svv = printer.save_variables.variables %} 8 | {% if 'park_x' in svv %} 9 | {% set default_x = svv.park_x %} 10 | {% endif %} 11 | {% if 'park_y' in svv %} 12 | {% set default_y = svv.park_y %} 13 | {% endif %} 14 | {% endif %} 15 | 16 | {% set x = params.X|default(default_x)|float %} 17 | {% set y = params.Y|default(default_y)|float %} 18 | {% set z = params.Z|default(20)|float %} 19 | {% set r = params.R|default(3)|float %} 20 | 21 | {% if printer.pause_resume.is_paused %} 22 | {action_respond_info("Already paused")} 23 | {% elif printer.toolhead.homed_axes != "xyz" %} 24 | {action_respond_info("Please home XYZ first")} 25 | {% else %} 26 | PAUSE 27 | {% if r > 0.0 %} 28 | RETRACT D={r} 29 | {% endif %} 30 | G27 X{x} Y{y} Z{z} 31 | {% endif %} 32 | -------------------------------------------------------------------------------- /macros/PAUSE_RESUME.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro PAUSE] 2 | description: Pause the actual running print 3 | rename_existing: PAUSE_BASE 4 | gcode: 5 | PAUSE_BASE 6 | _TOOLHEAD_PARK_PAUSE_CANCEL 7 | 8 | [gcode_macro RESUME] 9 | description: Resume the actual running print 10 | rename_existing: RESUME_BASE 11 | gcode: 12 | ##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro ##### 13 | {% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %} 14 | #### get VELOCITY parameter if specified #### 15 | {% if 'VELOCITY' in params|upper %} 16 | {% set get_params = ('VELOCITY=' + params.VELOCITY) %} 17 | {%else %} 18 | {% set get_params = "" %} 19 | {% endif %} 20 | ##### end of definitions ##### 21 | {% if printer.extruder.can_extrude|lower == 'true' %} 22 | M83 23 | G1 E{extrude} F2100 24 | {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %} 25 | {% else %} 26 | {action_respond_info("Extruder not hot enough")} 27 | {% endif %} 28 | RESUME_BASE {get_params} 29 | 30 | [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] 31 | description: Helper: park toolhead used in PAUSE and CANCEL_PRINT 32 | variable_extrude: 1.0 33 | gcode: 34 | ##### set park positon for x and y ##### 35 | # default is your max posion from your printer.cfg 36 | {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} 37 | {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} 38 | {% set z_park_delta = 2.0 %} 39 | ##### calculate save lift position ##### 40 | {% set max_z = printer.toolhead.axis_maximum.z|float %} 41 | {% set act_z = printer.toolhead.position.z|float %} 42 | {% if act_z < (max_z - z_park_delta) %} 43 | {% set z_safe = z_park_delta %} 44 | {% else %} 45 | {% set z_safe = max_z - act_z %} 46 | {% endif %} 47 | ##### end of definitions ##### 48 | {% if printer.extruder.can_extrude|lower == 'true' %} 49 | M83 50 | G1 E-{extrude} F2100 51 | {% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %} 52 | {% else %} 53 | {action_respond_info("Extruder not hot enough")} 54 | {% endif %} 55 | {% if "xyz" in printer.toolhead.homed_axes %} 56 | G91 57 | G1 Z{z_safe} F900 58 | G90 59 | G1 X{x_park} Y{y_park} F6000 60 | {% if printer.gcode_move.absolute_coordinates|lower == 'false' %} G91 {% endif %} 61 | {% else %} 62 | {action_respond_info("Printer not homed")} 63 | {% endif %} -------------------------------------------------------------------------------- /macros/PID_TUNE.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # PID Tune Macros # 3 | # Version 1.0 2023-1-30 # 4 | ##################################### 5 | 6 | ################################ 7 | ######### PID_EXTRUDER ######### 8 | ################################ 9 | [gcode_macro PID_EXTRUDER] 10 | description: PID Tune for the Extruder 11 | gcode: 12 | {% set e = printer.toolhead.extruder %} 13 | {% set T = params.TEMPERATURE|default(210)|float %} 14 | {% set S = params.FAN_IN_PERCENT|default(0)|float *2.55 %} 15 | {% set P = printer.configfile.config[e].pid_kp|float %} 16 | {% set I = printer.configfile.config[e].pid_ki|float %} 17 | {% set D = printer.configfile.config[e].pid_kd|float %} 18 | M106 S{S} 19 | M118 // PID parameters: pid_Kp={P} pid_Ki={I} pid_Kd={D} (old) 20 | PID_CALIBRATE HEATER={e} TARGET={T} 21 | TURN_OFF_HEATERS 22 | SAVE_CONFIG 23 | 24 | ################################ 25 | ############ PID_BED ########### 26 | ################################ 27 | [gcode_macro PID_BED] 28 | description: PID Tune for the Bed 29 | gcode: 30 | {% set T = params.TEMPERATURE|default(60)|float %} 31 | {% set P = printer.configfile.config['heater_bed'].pid_kp|float %} 32 | {% set I = printer.configfile.config['heater_bed'].pid_ki|float %} 33 | {% set D = printer.configfile.config['heater_bed'].pid_kd|float %} 34 | M118 // PID parameters: pid_Kp={P} pid_Ki={I} pid_Kd={D} (old) 35 | PID_CALIBRATE HEATER=heater_bed TARGET={T} 36 | TURN_OFF_HEATERS 37 | SAVE_CONFIG -------------------------------------------------------------------------------- /macros/POST_END.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro POST_END] 2 | gcode: 3 | #CLEAR_PAUSE 4 | {% if 't5uid1' in printer %} 5 | DGUS_PRINT_END 6 | {% endif %} 7 | STATUS_SUCCESS 8 | M220 S100 9 | M221 S100 10 | M900 K0 11 | {% if printer.extruder.temperature >= 170 %} 12 | M83 13 | G91 14 | G1 E-2 F2400 15 | G1 E-2 Z5 F2400 16 | {% endif %} 17 | M82 18 | G90 19 | 20 | # Calculate our parking height 21 | {% set Z_POS = printer.toolhead.position.z|default(100) %} # current z_pos 22 | {% set Z_MAX = printer.toolhead.axis_maximum.z|default(150) %} # z max_pos 23 | {% set Z_LIMIT = Z_MAX * 0.75 %} # Set the limit to 75% of the z max_pos 24 | 25 | {% if Z_POS < Z_LIMIT %} # make sure current position is below the limit 26 | {% set Z_PARK = (Z_MAX - Z_POS) * 0.25 %} # 25% of the difference between max_pos and current 27 | {% else %} # if we are 75% of the way to max already 28 | {% set Z_PARK = 0 %} # just park at current height 29 | {% endif %} 30 | 31 | # Use Z_PARK param if supplied 32 | {% if params.Z_PARK %} 33 | {% set Z_PARK = (params.Z_PARK - Z_POS)|default(0)|float %} 34 | {% endif %} 35 | 36 | # Sanity check to make sure the calculated 37 | # park_height is at least the current height 38 | {% if Z_PARK < 0 %} # If it's lower 39 | {% set Z_PARK = 0 %} # just use the current height 40 | {% endif %} 41 | 42 | # Park X just off the endstop or use X_PARK param 43 | {% set X_PARK = params.X_PARK|default(printer.toolhead.axis_minimum.x + 10)|float %} 44 | # Park Y at the center point or use Y_PARK param 45 | {% set Y_PARK = params.Y_PARK|default((printer.toolhead.axis_maximum.y + printer.toolhead.axis_maximum.y) * 0.5)|float %} 46 | G91 47 | G1 Z{Z_PARK} 48 | G90 49 | G1 X{X_PARK} Y{Y_PARK} F3000 50 | 51 | M104 S0 52 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 53 | M106 S0 54 | M84 X Y E 55 | STATUS_READY 56 | SAVE_IF_SET 57 | -------------------------------------------------------------------------------- /macros/PRESENT_PRINT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro END_PRINT] 2 | description: Present the finished print 3 | gcode: 4 | {% set SEQUENTIAL_PRINT = printer["gcode_macro START_PRINT"].sequential_print %} 5 | {% set SEQUENCE_NUM = printer["gcode_macro START_PRINT"].sequence_num %} 6 | {% if SEQUENTIAL_PRINT > 0 %} ; If we are doing a sequenced print, 7 | {% if SEQUENCE_NUM == SEQUENTIAL_PRINT %} ; Final part completed 8 | M117 Final Part Completed 9 | COMPLETE_PRINT 10 | {% else %} ; Not the last part 11 | M117 Part {SEQUENCE_NUM} Complete. Please prepare next part 12 | CHANGE_FILAMENT ; Initiate a filament swap 13 | {% endif %} 14 | {% else %} ; If not sequenced prints, 15 | COMPLETE_PRINT 16 | {% endif %} 17 | 18 | [gcode_macro COMPLETE_PRINT] 19 | description: Finalize print 20 | gcode: 21 | {% set svv = printer.save_variables.variables %} 22 | {% set SEQUENCE_NUM = 0 %} ; Reset the counter 23 | {% set MATERIAL = printer["gcode_macro START_PRINT"].filament %} 24 | {% set COLOUR = printer["gcode_macro START_PRINT"].colour %} 25 | SAVE_VARIABLE VARIABLE=last_material VALUE="'{MATERIAL}'" 26 | SAVE_VARIABLE VARIABLE=last_color VALUE="'{COLOUR}'" 27 | # Activate fireworks! 28 | STATUS_SUCCESS 29 | # Disable filament sensor 30 | DISABLEFILAMENTSENSOR 31 | # Turn down controller fans 32 | SYSTEM_FANS_OFF TARGET=45 33 | # Turn down the toolboard fan 34 | TOOLBOARD_FAN_OFF TARGET=45 35 | # Scrub VOCs 36 | {% set SCRUB = printer["gcode_macro SCRUBBER"].scrub %} 37 | {% set SCRUB_TIME = svv.scrub_time %} 38 | {% if SCRUB > 0 %} 39 | SCRUBBER TIME={SCRUB_TIME} EXHAUST=1 40 | {% endif %} 41 | # Acknowledge success! 42 | M117 Print Complete 43 | # Run end sequence 44 | POST_END 45 | # Play success tune 46 | MARIO_TUNE 47 | CLEAR_STATUS TIMEOUT=60 -------------------------------------------------------------------------------- /macros/PRE_START.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro PRE_START] 2 | gcode: 3 | {% set wz = params.WZ|default(0.25)|float %} 4 | {% set wn = params.WN|default(0.4)|float %} 5 | #CLEAR_PAUSE 6 | M106 S0 7 | M220 S100 8 | M221 S100 9 | M900 K0 10 | {% if 't5uid1' in printer %} 11 | DGUS_PRINT_START 12 | {% endif %} 13 | G28 14 | WIPE_LINE Z={wz} N={wn} 15 | -------------------------------------------------------------------------------- /macros/PRIME_NOZZ.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro PRIME_NOZZ] 2 | description: Primes the nozzle and extruder for printing 3 | gcode: 4 | 5 | #Get Printer built volume dimensions 6 | {% set X_MAX = printer.toolhead.axis_maximum.x|default(100)|float %} 7 | {% set Y_MAX = printer.toolhead.axis_maximum.y|default(100)|float %} 8 | {% set Z_MAX = printer.toolhead.axis_maximum.z|default(100)|float %} 9 | 10 | #Get Nozzle diameter and filament width for conditioning 11 | {% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %} 12 | {% set FILADIA = printer.extruder.filament_diameter|default(1.75)|float %} 13 | 14 | #Set Start coordinates of priming lines 15 | {% set X_START = 10|default(5.0)|float %} 16 | {% set Y_START = 10|default(10.0)|float %} 17 | 18 | #Calculate Primer line extrusion volume and filament length 19 | {% set PRIMER_WIDTH = 0.75 * NOZZLE %} 20 | {% set PRIMER_HEIGHT = 0.70 * NOZZLE %} 21 | {% set PRIMER_SECT = PRIMER_WIDTH * PRIMER_HEIGHT %} 22 | {% set PRIMER_VOL = PRIMER_SECT * (X_MAX - 3 * X_START) %} 23 | {% set FILA_SECT = 3.1415 * ( FILADIA / 2.0)**2 %} 24 | {% set FILA_LENGTH = 1.55 * PRIMER_VOL / FILA_SECT %} 25 | {% set FILAMENT_TYPE = params.FILAMENT|default(PLA)|string %} 26 | 27 | #Get Bed, Extruder, and Chamber temperatures from Slicer GCode 28 | {% set BED_TEMP = params.BED|default(60)|float %} 29 | {% set EXTRUDER_TEMP = params.EXTRUDER|default(210)|float %} 30 | {% set CHAMBER_TEMP = params.CHAMBER|default(50)|float %} 31 | 32 | 33 | M117 Priming Nozzle and Preconditioning Extruder 34 | 35 | G1 Z0.28 F240 ; Move Z Axis up little to prevent scratching of Heat Bed 36 | 37 | ; Prime extruder in the Y direction 38 | G92 E0 ; Reset Extruder 39 | G1 X{X_START} Y{Y_START} Z{PRIMER_HEIGHT} F5000.0 ; Move to start position 40 | G1 Y{Y_MAX - 2 * Y_START} E{FILA_LENGTH} F2000.0 ; Draw the first line 41 | G1 X{X_START + PRIMER_WIDTH} Y{Y_MAX - 2 * Y_START} Z{PRIMER_HEIGHT} E{FILA_LENGTH} F2000.0 ; Draw the second line 42 | 43 | ; Prime extruder in the X direction 44 | G92 E0 ; Reset Extruder 45 | G1 X{X_START} Y{Y_START} Z{PRIMER_HEIGHT} F5000.0 ; Move to start position 46 | G1 X{X_MAX - 2 * X_START} Y{Y_START} Z{PRIMER_HEIGHT} E{FILA_LENGTH} F2000.0 47 | G1 X{X_MAX - 2 * X_START} Y{Y_START + PRIMER_WIDTH} Z{PRIMER_HEIGHT} E{FILA_LENGTH} F2000.0 ; Draw the second line 48 | 49 | ; Move Z Axis up and down to clear the nozzle 50 | G92 E0 ; Reset Extruder 51 | G1 Z2.0 F600 52 | G1 Z{PRIMER_HEIGHT} F600 53 | G1 Z2.0 F600 54 | G1 Z{PRIMER_HEIGHT} F600 55 | G1 Z5.0 F600 56 | -------------------------------------------------------------------------------- /macros/PRINT_STATS.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro GET_PRINT_STATS] 2 | description: Returns stats about the current print 3 | gcode: 4 | {% set print_state = printer.idle_timeout.state %} 5 | {% set print_time = printer.idle_timeout.printing_time %} 6 | {% set paused_state = printer.pause_resume.is_paused %} 7 | {% set print_stats = printer.print_stats %} 8 | {% set total_layers = print_stats.info.total_layer %} 9 | {% set cur_layer = print_stats.info.current_layer %} 10 | {% if print_state == "Printing" %} 11 | RESPOND MSG="Print Time: {print_time} seconds" 12 | RESPOND MSG="Total Layers: {total_layers}" 13 | RESPOND MSG="Curent Layer: {cur_layer}" 14 | {% if paused_state %} 15 | RESPOND MSG="Print is paused." 16 | {% endif %} 17 | {% else %} 18 | RESPOND TYPE=error MSG="No print in progress. State is: {print_state}" 19 | {% endif %} 20 | -------------------------------------------------------------------------------- /macros/PUBLISH_ALERT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro PUBLISH_ALERT] 2 | description: Publish Alerts 3 | gcode: 4 | {% set data = params.PAYLOAD|default(None) %} 5 | {action_call_remote_method("publish_mqtt_topic", 6 | topic="klipper/alert", 7 | payload=data, 8 | qos=0, 9 | retain=False, 10 | use_prefix=True)} -------------------------------------------------------------------------------- /macros/RESTART_KLIPPERSCREEN.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro RESTART_KLIPPERSCREEN] 2 | description: Restart the KlipperScreen process 3 | gcode: 4 | RUN_SHELL_COMMAND CMD=restart_ks 5 | 6 | [gcode_shell_command restart_ks] 7 | command: sh /home/pi/printer_data/config/scripts/restart_ks.sh 8 | timeout: 60. 9 | verbose: True 10 | 11 | [delayed_gcode klipperscreen_restart] 12 | initial_duration: 2 13 | gcode: 14 | RESTART_KLIPPERSCREEN -------------------------------------------------------------------------------- /macros/RETRACT.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro RETRACT] 2 | gcode: 3 | {% set f = params.F|default(600)|float %} 4 | 5 | {% if 'D' in params %} 6 | {% if printer.idle_timeout.state == "Printing" and not printer.pause_resume.is_paused %} 7 | {action_respond_info("This command cannot be used while printing")} 8 | {% elif printer.extruder.temperature < 170 %} 9 | {action_respond_info("Extruder temperature too low")} 10 | {% else %} 11 | SAVE_GCODE_STATE NAME=RETRACT_state 12 | M83 13 | G1 E-{params.D} F{f} 14 | RESTORE_GCODE_STATE NAME=RETRACT_state MOVE=0 15 | {% endif %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /macros/SAVE_AT_END.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro SAVE_AT_END] 2 | variable_save: 0 3 | gcode: 4 | SET_GCODE_VARIABLE MACRO=SAVE_AT_END VARIABLE=save VALUE=1 5 | -------------------------------------------------------------------------------- /macros/SAVE_IF_SET.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro SAVE_IF_SET] 2 | gcode: 3 | {% if printer["gcode_macro SAVE_AT_END"].save == 1 %} 4 | SAVE_CONFIG 5 | {% endif %} 6 | -------------------------------------------------------------------------------- /macros/SCRUB_TIMER.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro SCRUBBER] 2 | description: Run the Nevermore for a set time 3 | variable_scrub: 0 4 | variable_scrub_time: 0 5 | gcode: 6 | # Set params and variables 7 | {% set svv = printer.save_variables.variables %} 8 | {% set FILAMENT_TYPE = printer["gcode_macro START_PRINT"].filament %} 9 | {% if params.TIME != null %} 10 | {% set SCRUB_TIME = params.TIME|default(600)|float %} 11 | {% endif %} 12 | {% if params.EXHAUST != null %} 13 | {% set EXHAUST = params.EXHAUST|default(0)|float %} 14 | {% else %} 15 | {% set EXHAUST = 0 %} 16 | {% endif %} 17 | SET_GCODE_VARIABLE MACRO=SCRUBBER VARIABLE=scrub_time VALUE={SCRUB_TIME} 18 | SAVE_VARIABLE VARIABLE=scrub_time VALUE={SCRUB_TIME} 19 | # Turn on Nevermore to scrub 20 | NEVERMORE_LOW 21 | # Set shut-off timer 22 | {% if EXHAUST == 0 %} 23 | UPDATE_DELAYED_GCODE ID=scrub_off DURATION={SCRUB_TIME} 24 | {% else %} 25 | UPDATE_DELAYED_GCODE ID=scrub_out DURATION={SCRUB_TIME} 26 | {% endif %} 27 | 28 | [delayed_gcode scrub_off] 29 | gcode: 30 | NEVERMORE_OFF 31 | 32 | [delayed_gcode scrub_out] 33 | gcode: 34 | NEVERMORE_OFF 35 | EXHAUST_ON TARGET=30 -------------------------------------------------------------------------------- /macros/SEARCH_VARS.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro SEARCH_VARS] 2 | gcode: 3 | {% set search = params.S|lower %} 4 | {% set ns = namespace() %} 5 | {% for item in printer %} 6 | {% if ' ' in item %} 7 | {% set ns.path = ['printer', "['%s']" % (item), ''] %} 8 | {% else %} 9 | {% set ns.path = ['printer.', item, ''] %} 10 | {% endif %} 11 | 12 | {% if search in ns.path|lower %} 13 | { action_respond_info(ns.path|join) } 14 | {% endif %} 15 | 16 | {% if printer[item].items() %} 17 | {% for childkey, child in printer[item].items() recursive %} 18 | {% set ns.path = ns.path[:loop.depth|int + 1] %} 19 | 20 | {% if ' ' in childkey %} 21 | {% set null = ns.path.append("['%s']" % (childkey)) %} 22 | {% else %} 23 | {% set null = ns.path.append(".%s" % (childkey)) %} 24 | {% endif %} 25 | 26 | {% if child is mapping %} 27 | { loop(child.items()) } 28 | {% else %} 29 | {% if search in ns.path|lower %} 30 | { action_respond_info("%s : %s" % (ns.path|join, child)) } 31 | {% endif %} 32 | {% endif %} 33 | 34 | {% endfor %} 35 | {% endif %} 36 | {% endfor %} -------------------------------------------------------------------------------- /macros/SET_ADV_VELOCITY.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro SET_ADV_VELOCITY] 2 | description: Set Advanced Velocity 3 | gcode: 4 | M205 -------------------------------------------------------------------------------- /macros/SET_MATERIAL.cfg: -------------------------------------------------------------------------------- 1 | # Set Material-specific Configs 2 | # 3 | # Add this immediately after your start_print line of the start gcode in Prusa/SuperSlicer: 4 | # SET_MATERIAL MATERIAL='{filament_type[initial_extruder]}' 5 | # 6 | # Add this immediately after your start_print line of the start gcode in Cura: 7 | # SET_MATERIAL MATERIAL='{material_type}' 8 | # 9 | # 10 | 11 | [gcode_macro SET_MATERIAL] 12 | gcode: 13 | {% set MATERIAL = params.MATERIAL|default('PLA')|string %} 14 | {% if MATERIAL == 'PLA' %} 15 | # Load bed mesh 16 | #BED_MESH_PROFILE LOAD="pla_mesh" 17 | # Set pressure_advance settings 18 | #SET_PRESSURE_ADVANCE ADVANCE=0.035 SMOOTH_TIME=0.040 19 | # Set z_offset settings 20 | #SET_GCODE_OFFSET Z=0 21 | {% elif MATERIAL == 'ABS' %} 22 | #BED_MESH_PROFILE LOAD="pla_mesh" 23 | #SET_PRESSURE_ADVANCE ADVANCE=0.035 SMOOTH_TIME=0.040 24 | #SET_GCODE_OFFSET Z=0 25 | {%else %} 26 | #BED_MESH_PROFILE LOAD="default" 27 | #SET_PRESSURE_ADVANCE ADVANCE=0.035 SMOOTH_TIME=0.040 28 | #SET_GCODE_OFFSET Z=0 29 | {% endif %} -------------------------------------------------------------------------------- /macros/START_HEAT_SOAK.cfg: -------------------------------------------------------------------------------- 1 | # Run with: 2 | # START_HEAT_SOAK SOAK=10 BED_TEMP=110 3 | # 4 | # Or from START_PRINT: 5 | # START_HEAT_SOAK SOAK=10 BED_TEMP={BED_TEMP} 6 | 7 | [gcode_macro START_HEAT_SOAK] 8 | gcode: 9 | {% set SOAK = params.SOAK|default(15) %} 10 | {% set BED_TEMP = params.BED_TEMP|default(100)|float %} 11 | M117 Starting Warmup #if the bed is already at the correct target temp, we assume no heat soak is necessary. 12 | {% if (SOAK) <= 0 or (printer.heater_bed.target >= (BED_TEMP - 20)) %} 13 | {% else %} 14 | M117 Heating for Soak 15 | M190 S{BED_TEMP} 16 | M117 Starting Soak 17 | {% for timer in range( SOAK,0,-1) %} #we cycle once a minute, so we can send an update to keep octoprint happy, rather than just sleeping for the entire soak 18 | M117 Soak: {timer|int}m remaining 19 | M105 20 | G4 P60000 21 | {% endfor %} 22 | M117 Soak Complete 23 | {% endif %} -------------------------------------------------------------------------------- /macros/TARGET_FAN.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TARGET_FAN] 2 | gcode: 3 | {% set HEATER_TARGET = params.HEATER_TARGET|default(60)|float %} 4 | {% set FAN_TARGET = params.FAN_TARGET|default(100)|float %} 5 | {% set FAN_SPEED = params.FAN_SPEED|default(1)|float %} 6 | {% set FAN_NAME = params.FAN_NAME|default('bed_fan')|string %} 7 | 8 | {% if HEATER_TARGET >= FAN_TARGET %} 9 | SET_FAN_SPEED FAN={FAN_NAME} SPEED={FAN_SPEED} # Turn on bed_fan if target is above or equal. 10 | {% else %} 11 | SET_FAN_SPEED FAN={FAN_NAME} SPEED=0 # Turn off bed_fan if target is below bed_target 12 | {% endif %} 13 | 14 | # Assuming you have something like this in your START_PRINT macro: 15 | # {% set BED_TEMP = params.BED_TEMP|default(60)|float %} 16 | # 17 | # Then you can add the following line to use this macro: 18 | # 19 | # TARGET_FAN HEATER_TARGET={BED_TEMP} FAN_TARGET=100 20 | # 21 | # This will start the fan if the BED_TEMP target is greater or equal to 100. 22 | # 23 | # 24 | # You can now optionally specify the following parameters: 25 | # 26 | # FAN_SPEED: This is a value from 0-1 that represents the fan speed you want to use. 27 | # 28 | # FAN_NAME: This should be the name of the generic_fan you wish to control. 29 | # 30 | # This allows us to use multiple fan speeds and even multiple fans with this macro. 31 | # 32 | # I also changed BED_TARGET to HEATER_TARGET to make this more generic for 33 | # use with any heater/fan combination. Sorry, last breaking change to this macro, I promise! 34 | -------------------------------------------------------------------------------- /macros/TELEGRAM.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TELEGRAM_FILAMENT_RUNOUT] 2 | gcode: 3 | RESPOND PREFIX=telegram_picture: MSG="Filament Runout Detected! $print_filename $print_progress L: $current_layer/$layers Z: $z_current" 4 | RESPOND PREFIX=mooncord.broadcast MSG="Filament Runout Detected!" 5 | 6 | [gcode_macro _bot_data] 7 | variable_lapse_video_size: 0 8 | variable_lapse_filename: 'None' 9 | variable_lapse_path: 'None' 10 | gcode: 11 | M118 Setting bot lapse variables -------------------------------------------------------------------------------- /macros/TEST_RESONANCES.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TEST_RESONANCES] 2 | rename_existing: TEST_RESONANCES_BASE 3 | gcode: 4 | STATUS_VIBRATING 5 | TEST_RESONANCES_BASE {rawparams} 6 | CLEAR_STATUS -------------------------------------------------------------------------------- /macros/TEST_STATE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TEST_STATE] 2 | gcode: 3 | {% if printer.idle_timeout.state == "Printing" %} 4 | RESPOND MSG="We are printing" 5 | {% endif %} 6 | RESPOND MSG="State: {printer.idle_timeout.state}" -------------------------------------------------------------------------------- /macros/UNSAFE_RAISE_TOOL.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro UNSAFE_RAISE_TOOL] 2 | description: Raise the toolhead 10mm without homing 3 | gcode: 4 | G90 5 | SET_KINEMATIC_POSITION Z=0 6 | G0 Z10 F600 7 | M84 -------------------------------------------------------------------------------- /macros/WIPE_LINE.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro WIPE_LINE] 2 | gcode: 3 | {% set z = params.Z|default(0.25)|float %} 4 | {% set NOZZLE = printer.extruder.nozzle_diameter|default(0.4)|float %} 5 | {% set n = params.N|default(NOZZLE)|float %} 6 | {% set X_MAX = printer.toolhead.axis_maximum.x|default(200)|float %} 7 | {% set Y_MAX = printer.toolhead.axis_maximum.y|default(200)|float %} 8 | {% set Z_MAX = printer.toolhead.axis_maximum.z|default(150)|float %} 9 | {% set X_START = printer.toolhead.axis_minimum.x|default(0)|float + n %} 10 | {% set Y_START = printer.toolhead.axis_minimum.y|default(0)|float + n %} 11 | {% if X_START < 0 %} 12 | {% set X_START = n %} 13 | {% endif %} 14 | {% if Y_START < 0 %} 15 | {% set Y_START = n %} 16 | {% endif %} 17 | {% set FILADIA = printer.extruder.filament_diameter|default(1.75)|float %} 18 | {% set EXTRUDER_RATIO = printer.configfile.config.extruder.nozzle_diameter|float / n %} 19 | {% set PRIMER_WIDTH = 0.75 * NOZZLE %} 20 | {% set PRIMER_HEIGHT = 0.70 * NOZZLE %} 21 | {% set PRIMER_SECT = PRIMER_WIDTH * PRIMER_HEIGHT %} 22 | {% set PRIMER_VOL = PRIMER_SECT * (X_MAX - 3 * X_START) %} 23 | {% set FILA_SECT = 3.1415 * ( FILADIA / 2.0)**2 %} 24 | {% set FILA_LENGTH = 1.55 * PRIMER_VOL / FILA_SECT %} 25 | {% if printer.toolhead.homed_axes != "xyz" %} 26 | {action_respond_info("Please home XYZ first")} 27 | {% elif printer.extruder.can_extrude != True %} 28 | {action_respond_info("Extruder temperature too low")} 29 | {% else %} 30 | SAVE_GCODE_STATE NAME=WIPE_LINE_state 31 | M117 Priming nozzle 32 | M82 33 | G90 34 | G92 E0 35 | G1 X{X_START} Y{Y_START} Z3 F2500 ; Move down to prestart position 36 | G1 X{X_START} Y{Y_START + 25} Z{PRIMER_HEIGHT} F5000.0 ; Move to start position 37 | G1 X{X_START} Y{Y_MAX - 25} Z{PRIMER_HEIGHT} F1500.0 E{15 * EXTRUDER_RATIO} ; Draw the first line 38 | G1 X{X_START + PRIMER_WIDTH} Y{Y_MAX - 25} Z{PRIMER_HEIGHT} F5000.0 ; Move to side a little 39 | G1 X{X_START + PRIMER_WIDTH} Y{Y_START + 25} Z{PRIMER_HEIGHT} F1500.0 E{30 * EXTRUDER_RATIO} ; Draw the second line 40 | RESTORE_GCODE_STATE NAME=WIPE_LINE_state MOVE=0 41 | M117 Priming complete 42 | {% endif %} -------------------------------------------------------------------------------- /macros/clean_backups.cfg: -------------------------------------------------------------------------------- 1 | ##################################### 2 | # Clean Backups # 3 | # Version 1.2.5 2023-2-17 # 4 | ##################################### 5 | 6 | # This script cleans backup files 7 | # from the base folder by moving them 8 | # to an archive folder. 9 | 10 | [delayed_gcode clean_backups] 11 | initial_duration: 2 12 | gcode: 13 | RUN_SHELL_COMMAND CMD=backup_cleaner 14 | 15 | [gcode_shell_command backup_cleaner] 16 | command: sh /home/pi/printer_data/config/scripts/clean_backups.sh 17 | timeout: 60. 18 | verbose: True -------------------------------------------------------------------------------- /macros/heater_overrides.cfg: -------------------------------------------------------------------------------- 1 | # Replace M109/M190 with TEMPERATURE_WAIT commands 2 | 3 | [gcode_macro M109] 4 | rename_existing: M99109 5 | gcode: 6 | #Parameters 7 | {% set s = params.S|float %} 8 | #Active extruder 9 | {% set t = printer.toolhead.extruder %} 10 | 11 | M104 {rawparams} ; Set hotend temp 12 | {% if s != 0 %} 13 | TEMPERATURE_WAIT SENSOR={t} MINIMUM={s} MAXIMUM={s+1} ; Wait for hotend temp (within 1 degree) 14 | {% endif %} 15 | 16 | [gcode_macro M190] 17 | rename_existing: M99190 18 | gcode: 19 | #Parameters 20 | {% set s = params.S|float %} 21 | 22 | M140 {rawparams} ; Set bed temp 23 | {% if s != 0 %} 24 | TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s} MAXIMUM={s+1} ; Wait for bed temp (within 1 degree) 25 | {% endif %} 26 | 27 | [gcode_macro M104] 28 | rename_existing: M99104 29 | gcode: 30 | #Parameters 31 | {% set s = params.S|float %} 32 | #Active extruder 33 | {% set t = printer.toolhead.extruder %} 34 | 35 | SET_HEATER_TEMPERATURE HEATER={t} TARGET={s} 36 | 37 | [gcode_macro M140] 38 | rename_existing: M99140 39 | gcode: 40 | #Parameters 41 | {% set s = params.S|float %} 42 | SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={s} -------------------------------------------------------------------------------- /macros/simple-m600.cfg: -------------------------------------------------------------------------------- 1 | # Edit the default() value for LENGTH 2 | # to the amount of retraction required to unload the filament 3 | [gcode_macro UNLOAD_FIL] 4 | gcode: 5 | {% set LENGTH = params.LENGTH|default(80)|float %} 6 | 7 | {% if printer.configfile.config.extruder.min_extrude_temp is defined %} 8 | {% set TARGET = printer.configfile.config.extruder.min_extrude_temp|float %} 9 | {% else %} 10 | {% set TARGET = 220.0 %} 11 | {% endif %} 12 | 13 | {% set TEMP = printer.extruder.temperature|float %} 14 | 15 | {% if TEMP|int < TARGET|int %} 16 | M117 Heating nozzle... 17 | M109 S{TARGET} 18 | {% endif %} 19 | 20 | G91 21 | G1 E5.0 F1200 22 | G1 E3.0 F1600 23 | G1 E-13.14 F7000 24 | G1 E-{LENGTH} F3000 25 | G90 26 | 27 | [gcode_macro SIMPLE_M600] 28 | gcode: 29 | SET_IDLE_TIMEOUT TIMEOUT=7200 30 | PAUSE 31 | UNLOAD_FIL 32 | 33 | [gcode_macro PURGE_MACRO] 34 | gcode: 35 | M117 PURGING.. 36 | G91 37 | G1 E45.0 F250 38 | G90 39 | 40 | # # Edit the default() value for FAST 41 | # to the amount of extrusion required to bring the filament to 42 | # just before it starts coming out the hotend 43 | 44 | # # Edit the default() value for SLOW 45 | # to the amount of extrusion required after it reaches the hotend 46 | 47 | [gcode_macro LOAD_FIL] 48 | gcode: 49 | {% set SLOW = params.SLOW|default(60)|float %} 50 | {% set FAST = params.FAST|default(80)|float %} 51 | M117 LOADING... 52 | G91 53 | G1 E25.0 F1000 54 | G1 E{FAST} F2500 55 | G4 P900 56 | G1 E{SLOW} F250 57 | G90 -------------------------------------------------------------------------------- /macros/test_mesh_wait.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro MESH_WAIT] 2 | gcode: 3 | RESPOND MSG="Before" 4 | G28 X 5 | RESPOND MSG="Middle" 6 | FINAL_RESPONSE 7 | 8 | [gcode_macro FINAL_RESPONSE] 9 | gcode: 10 | RESPOND MSG="After" -------------------------------------------------------------------------------- /macros/wake_extruder.cfg: -------------------------------------------------------------------------------- 1 | 2 | [gcode_macro _wake_extruder] 3 | gcode: 4 | {% set driver_config = printer.configfile.settings['tmc2209 extruder'] %} 5 | {% set RUN_CUR = driver_config.run_current %} 6 | SET_TMC_CURRENT STEPPER=extruder CURRENT={RUN_CUR} -------------------------------------------------------------------------------- /moonraker-obico-update.cfg: -------------------------------------------------------------------------------- 1 | [update_manager moonraker-obico] 2 | type: git_repo 3 | path: ~/moonraker-obico 4 | origin: https://github.com/TheSpaghettiDetective/moonraker-obico.git 5 | env: /home/pi/moonraker-env/bin/python 6 | requirements: requirements.txt 7 | install_script: install.sh 8 | managed_services: 9 | moonraker-obico -------------------------------------------------------------------------------- /moonraker-zippy.conf: -------------------------------------------------------------------------------- 1 | # Manage updates for the Rootiest ZippyPrint Configs 2 | [update_manager ZippyPrint] 3 | type: git_repo 4 | channel: dev 5 | primary_branch: master 6 | path: ~/printer_data/config 7 | origin: https://github.com/rootiest/zippy-klipper_config.git 8 | is_system_service: False 9 | managed_services: 10 | info_tags: 11 | desc=Rootiest Klipper Config for ZippyPrint Printer -------------------------------------------------------------------------------- /probe/crtouch-probe.cfg: -------------------------------------------------------------------------------- 1 | # CR Touch Probe 2 | [bltouch] 3 | sensor_pin: ^sb2040:gpio28 4 | control_pin: sb2040:gpio25 5 | x_offset: 44.2 6 | y_offset: 8.25 7 | probe_with_touch_mode: True 8 | pin_up_touch_mode_reports_triggered: True 9 | pin_move_time: 0.550 10 | stow_on_each_sample: False 11 | samples: 3 12 | samples_result: median 13 | samples_tolerance: 0.01 14 | samples_tolerance_retries: 5 15 | speed: 5 16 | lift_speed: 20 17 | 18 | # Probing position 19 | [safe_z_home] 20 | home_xy_position: 164, 136 21 | speed: 240 22 | z_hop: 5 23 | z_hop_speed: 150 24 | move_to_previous: True 25 | 26 | # Bed Mesh config 27 | [bed_mesh] 28 | speed: 240 29 | horizontal_move_z: 5 30 | mesh_min: 10, 10 31 | mesh_max: 205, 215 32 | probe_count: 5, 5 33 | mesh_pps: 5, 5 34 | algorithm: bicubic 35 | 36 | # Bed screw position and type 37 | [screws_tilt_adjust] 38 | screw1: 83,43 39 | screw1_name: front left screw 40 | screw2: 250,43 41 | screw2_name: front right screw 42 | screw3: 250,210 43 | screw3_name: rear right screw 44 | screw4: 83,210 45 | screw4_name: rear left screw 46 | horizontal_move_z: 10 47 | speed: 50 48 | screw_thread: CW-M4 -------------------------------------------------------------------------------- /probe/klicky-bed-mesh-calibrate.cfg: -------------------------------------------------------------------------------- 1 | # This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. 2 | # I have tweaked it a lot. 3 | # They are based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, 4 | # modified for better use on K-series printers by RyanG and Trails", kudos to them. 5 | # That macro as since evolved into a klipper plugin that currently is pending inclusion in klipper, 6 | # more information here, https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros 7 | # User richardjm revised the macro variables and added some functions, thanks a lot 8 | # by standing on the shoulders of giants, lets see if we can see further 9 | # 10 | # the current home for this version is https://github.com/jlas1/Klicky-Probe 11 | 12 | ################### 13 | # Bed mesh calibrate 14 | [gcode_macro BED_MESH_CALIBRATE] 15 | rename_existing: _BED_MESH_CALIBRATE 16 | description: Perform Mesh Bed Leveling with klicky automount 17 | gcode: 18 | {% set V = printer["gcode_macro _User_Variables"].verbose %} 19 | {% if V %} 20 | { action_respond_info("Bed Mesh Calibrate") } 21 | {% endif %} 22 | 23 | _CheckProbe action=query 24 | G90 25 | Attach_Probe 26 | _KLICKY_STATUS_MESHING 27 | 28 | _BED_MESH_CALIBRATE {% for p in params 29 | %}{'%s=%s ' % (p, params[p])}{% 30 | endfor %} 31 | 32 | Dock_Probe -------------------------------------------------------------------------------- /probe/klicky-probe.cfg: -------------------------------------------------------------------------------- 1 | #Simple way to include all the various klicky macros and configurations 2 | # the current home for this configuration is https://github.com/jlas1/Klicky-Probe, please check it 3 | 4 | #[include ./klicky-specific.cfg] 5 | [include ./klicky-variables.cfg] 6 | [include ./klicky-macros.cfg] 7 | [include ./klicky-screws-tilt-calculate.cfg] 8 | [include ./klicky-z-tilt-adjust.cfg] 9 | 10 | #[include ./klicky-bed-mesh-calibrate.cfg] 11 | #[include ./klicky-quad-gantry-level.cfg] 12 | 13 | # UnKlicky Probe 14 | [probe] 15 | pin: ^sb2040:gpio28 16 | x_offset: 0.0 17 | y_offset: 19.75 18 | #z_offset: 5.630 19 | speed: 20 20 | lift_speed: 25 21 | samples: 2 22 | samples_result: median 23 | sample_retract_dist: 1 24 | samples_tolerance: 0.01 25 | samples_tolerance_retries: 10 26 | 27 | # UnKlicky Servo 28 | [servo klicky_servo] 29 | pin: bed_board: gpio26 30 | maximum_servo_angle: 180 31 | initial_angle: 180 32 | minimum_pulse_width: 0.0004 33 | maximum_pulse_width: 0.0026 34 | 35 | # Z-Tilt 36 | [z_tilt] 37 | z_positions: 38 | -60,110 39 | 265,110 40 | points: 41 | 25,110 42 | 200,110 43 | retries: 20 44 | retry_tolerance: 0.005 45 | speed: 200 46 | horizontal_move_z: 7 47 | 48 | # Bed Mesh config 49 | [bed_mesh] 50 | speed: 200 51 | horizontal_move_z: 7 52 | mesh_min: 10, 28.25 53 | mesh_max: 215, 223.25 54 | probe_count: 7, 7 55 | mesh_pps: 3, 3 56 | algorithm: bicubic 57 | bicubic_tension: 0.5 58 | 59 | # Bed screw position and type 60 | [screws_tilt_adjust] 61 | screw1: -10,40 62 | screw1_name: front left screw 63 | screw2: 159,40 64 | screw2_name: front right screw 65 | screw3: 159,210 66 | screw3_name: rear right screw 67 | screw4: -10,210 68 | screw4_name: rear left screw 69 | horizontal_move_z: 10 70 | speed: 200 71 | screw_thread: CW-M4 72 | 73 | [gcode_macro _servo_test_angle] 74 | gcode: 75 | {% set ANGLE = params.ANGLE|int %} 76 | 77 | SET_SERVO SERVO=klicky_servo ANGLE={ANGLE} 78 | G4 P250 79 | SET_SERVO SERVO=klicky_servo WIDTH=0.0 80 | -------------------------------------------------------------------------------- /probe/klicky-screws-tilt-calculate.cfg: -------------------------------------------------------------------------------- 1 | # This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. 2 | # I have tweaked it a lot. 3 | # 4 | # this macro is based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, modified for better use on K-series printers by RyanG and Trails" 5 | # that macro as since evolved into a klipper plugin that currently is pending inclusion in klipper 6 | # more information here https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros 7 | # 8 | # by standing on the shoulders of giants, lets see if we can see further 9 | # User richardjm revised the macro variables and added some functions, thanks a lot 10 | # This macro home is https://github.com/jlas1/Klicky-Probe 11 | 12 | ################### 13 | ## Screws Tilt Adjust 14 | [gcode_macro SCREWS_TILT_CALCULATE] 15 | rename_existing: _SCREWS_TILT_CALCULATE 16 | description: 17 | gcode: 18 | {% set V = printer["gcode_macro _User_Variables"].verbose %} 19 | {% if V %} 20 | { action_respond_info("Screws Tilt Adjust") } 21 | {% endif %} 22 | 23 | _CheckProbe action=query 24 | G90 25 | Attach_Probe 26 | _KLICKY_STATUS_LEVELING 27 | 28 | _SCREWS_TILT_CALCULATE {% for p in params 29 | %}{'%s=%s ' % (p, params[p])}{% 30 | endfor %} 31 | 32 | Dock_Probe -------------------------------------------------------------------------------- /probe/klicky-z-tilt-adjust.cfg: -------------------------------------------------------------------------------- 1 | # This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. 2 | # I have tweaked it a lot. 3 | # 4 | # this macro is based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, modified for better use on K-series printers by RyanG and Trails" 5 | # that macro as since evolved into a klipper plugin that currently is pending inclusion in klipper 6 | # more information here https://github.com/Annex-Engineering/Quickdraw_Probe/tree/main/Klipper_Macros 7 | # 8 | # by standing on the shoulders of giants, lets see if we can see further 9 | # User richardjm revised the macro variables and added some functions, thanks a lot 10 | # This macro home is https://github.com/jlas1/Klicky-Probe 11 | 12 | ################### 13 | ## Z Tilt Adjust 14 | [gcode_macro Z_TILT_ADJUST] 15 | rename_existing: _Z_TILT_ADJUST 16 | description: 17 | gcode: 18 | {% set V = printer["gcode_macro _User_Variables"].verbose %} 19 | {% if V %} 20 | { action_respond_info("Z Tilt Adjust") } 21 | {% endif %} 22 | 23 | _CheckProbe action=query 24 | G90 25 | Attach_Probe 26 | _KLICKY_STATUS_LEVELING 27 | 28 | _Z_TILT_ADJUST {% for p in params 29 | %}{'%s=%s ' % (p, params[p])}{% 30 | endfor %} 31 | G28 Z0 32 | Dock_Probe -------------------------------------------------------------------------------- /scripts/clean_backups.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2023 Chris Laprade (chris@rootiest.com) 3 | # 4 | # This file is part of config. 5 | # 6 | # config is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # config is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with config. If not, see . 18 | 19 | /home/pi/printer_data/config/scripts/move_files.sh /home/pi/printer_data/config/ /home/pi/printer_data/config/archive/ "/home/pi/printer_data/config/printer-\d{8}_\d{6}\.cfg" -------------------------------------------------------------------------------- /scripts/datetime.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2022 Chris Laprade 4 | # 5 | # This file is part of zippy_config. 6 | # 7 | # zippy_config is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # zippy_config is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with zippy_config. If not, see . 19 | 20 | 21 | 22 | # Get the current date and time in a human-readable format 23 | time=$(date "+%c") 24 | 25 | # Return the time 26 | echo "$time" 27 | -------------------------------------------------------------------------------- /scripts/fix_os_stuff.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is just a couple of lines to fix common OS issues that can cause problems with Klipper. 4 | 5 | curl -sSL https://raw.githubusercontent.com/mainsail-crew/MainsailOS/develop/patches/udev-fix.sh | bash 6 | sudo apt remove brltty 7 | sudo systemctl disable ModemManager 8 | sudo reboot -------------------------------------------------------------------------------- /scripts/fix_scripts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2023 Chris Laprade 4 | # 5 | # This file is part of zippy_config. 6 | # 7 | # zippy_config is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # zippy_config is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with zippy_config. If not, see . 19 | 20 | # Copyright (C) 2023 Chris Laprade (chris@rootiest.com) 21 | # 22 | # This file is part of zippy_print. 23 | # 24 | # zippy_print is free software: you can redistribute it and/or modify 25 | # it under the terms of the GNU General Public License as published by 26 | # the Free Software Foundation, either version 3 of the License, or 27 | # (at your option) any later version. 28 | # 29 | # zippy_print is distributed in the hope that it will be useful, 30 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 31 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 32 | # GNU General Public License for more details. 33 | # 34 | # You should have received a copy of the GNU General Public License 35 | # along with zippy_print. If not, see . 36 | 37 | # Help function 38 | function show_help { 39 | echo "Usage: $0 [directory_path]" 40 | echo "Make every .sh and .py file executable in the specified directory and its subdirectories." 41 | exit 1 42 | } 43 | 44 | # Check if the correct number of arguments is passed 45 | if [[ $# -ne 1 ]]; then 46 | show_help 47 | fi 48 | 49 | # Check if the specified directory exists 50 | if [[ ! -d $1 ]]; then 51 | echo "Error: Directory not found" 52 | show_help 53 | fi 54 | 55 | # Count the number of .sh and .py files in the specified directory and its subdirectories 56 | sh_count=$(find "$1" -type f -name "*.sh" | wc -l) # Count the number of .sh files 57 | py_count=$(find "$1" -type f -name "*.py" | wc -l) # Count the number of .py files 58 | total_count=$((sh_count + py_count)) # Add the counts together to get the total count 59 | 60 | # Make every .sh and .py file executable 61 | find "$1" -type f \( -name "*.sh" -o -name "*.py" \) -print0 | while read -rd $'\0' file # Find all .sh and .py files and loop through them 62 | do 63 | if [[ ! -x $file ]]; then # Check if the file is not executable 64 | chmod -v +x "$file" # Make the file executable and print a message 65 | fi 66 | done 67 | 68 | # Output summary statistics 69 | echo "Modified permissions for $total_count files ($sh_count .sh files and $py_count .py files) in directory $1 and its subdirectories." 70 | -------------------------------------------------------------------------------- /scripts/git_backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export "$(grep -v '^#' ~/.gh_token | xargs -0)" 4 | 5 | ##################################################################### 6 | ### Please set the paths accordingly. In case you don't have all ### 7 | ### the listed folders, just keep that line commented out. ### 8 | ##################################################################### 9 | ### Path to your config folder you want to backup 10 | config_folder=~/klipper_config 11 | 12 | ### Path to your Klipper folder, by default that is '~/klipper' 13 | klipper_folder=~/klipper 14 | 15 | ### Path to your Moonraker folder, by default that is '~/moonraker' 16 | moonraker_folder=~/moonraker 17 | 18 | ### Path to your Mainsail folder, by default that is '~/mainsail' 19 | mainsail_folder=~/mainsail 20 | 21 | ### Path to your Fluidd folder, by default that is '~/fluidd' 22 | #fluidd_folder=~/fluidd 23 | 24 | ##################################################################### 25 | ##################################################################### 26 | 27 | 28 | ##################################################################### 29 | ################ !!! DO NOT EDIT BELOW THIS LINE !!! ################ 30 | ##################################################################### 31 | grab_version(){ 32 | if [ -n "$klipper_folder" ]; then 33 | echo -n "Getting klipper version=" 34 | cd "$klipper_folder" || exit 35 | klipper_commit=$(git rev-parse --short=7 HEAD) 36 | m1="Klipper on commit: $klipper_commit" 37 | echo "$klipper_commit" 38 | cd .. 39 | fi 40 | if [ -n "$moonraker_folder" ]; then 41 | echo -n "Getting moonraker version=" 42 | cd "$moonraker_folder" || exit 43 | moonraker_commit=$(git rev-parse --short=7 HEAD) 44 | m2="Moonraker on commit: $moonraker_commit" 45 | echo "$moonraker_commit" 46 | cd .. 47 | fi 48 | if [ -n "$mainsail_folder" ]; then 49 | echo -n "Getting mainsail version=" 50 | mainsail_ver=$(head -n 1 $mainsail_folder/.version) 51 | m3="Mainsail version: $mainsail_ver" 52 | echo "$mainsail_ver" 53 | fi 54 | if [ -n "$fluidd_folder" ]; then 55 | echo -n "Getting fluidd version=" 56 | fluidd_ver=$(head -n 1 "$fluidd_folder"/.version) 57 | m4="Fluidd version: $fluidd_ver" 58 | echo "$fluidd_ver" 59 | fi 60 | } 61 | 62 | push_config(){ 63 | cd $config_folder || exit 64 | echo Pushing updates 65 | git pull -v 66 | git add . -v 67 | current_date=$(date +"%Y-%m-%d %T") 68 | git commit -m "Backup triggered on $current_date" -m "$m1" -m "$m2" -m "$m3" -m "$m4" 69 | # git push "https://rootiest:$GH_TOKEN@github.com/rootiest/zippy-klipper_config.git" 70 | git push "git@github.com:rootiest/zippy-klipper_config.git" 71 | } 72 | 73 | grab_version 74 | push_config 75 | -------------------------------------------------------------------------------- /scripts/invert_file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright (C) 2023 Chris Laprade (chris@rootiest.com) 3 | # 4 | # This file is part of config. 5 | # 6 | # config is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # config is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with config. If not, see . 18 | 19 | # Check if both the source and output filename arguments are provided 20 | if [ $# -lt 2 ] 21 | then 22 | echo "Error: Two filenames are required." 23 | exit 1 24 | fi 25 | 26 | # Check if the source file exists 27 | if [ ! -f "$1" ] 28 | then 29 | echo "Error: Source file not found." 30 | exit 1 31 | fi 32 | 33 | # Extract the filename and extension of the source file 34 | source_filename=$(basename -- "$1") 35 | source_extension="${source_filename##*.}" 36 | source_filename="${source_filename%.*}" 37 | 38 | # Create the new filename with the provided output filename and extension of the source file 39 | output_filename=$2 40 | output_extension="${source_extension}" 41 | output_basename=$(basename -- "$2") 42 | output_basename="${output_basename%.*}" 43 | if [ "${output_filename}" = "${output_basename}" ] 44 | then 45 | output_filename="${output_filename}.${output_extension}" 46 | fi 47 | 48 | # Invert the file 49 | tac "$1" > "$output_filename" 50 | 51 | # Confirm successful inversion 52 | if [ $? -eq 0 ] 53 | then 54 | echo "File successfully inverted as $output_filename." 55 | else 56 | echo "Error: Unable to invert file." 57 | fi 58 | -------------------------------------------------------------------------------- /scripts/kamp_patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This script is used to patch the stock Klipper install with the testing KAMP fork 3 | cd ~ || exit 4 | git clone -b for/master/adaptive_bed_mesh https://github.com/voidtrance/klipper.git kamp-klipper 5 | cd kamp-klipper || exit 6 | mkdir ~/stock_klipper_files 7 | mv ~/klipper/klippy/extras/bed_mesh.py ~/stock_klipper_files/bed_mesh.py 8 | cd ~/kamp_klipper || exit 9 | ln -sr klippy/extras/bed_mesh.py ~/klipper/klippy/extras/ 10 | -------------------------------------------------------------------------------- /scripts/restart_ks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Copyright (C) 2023 Chris Laprade 4 | # 5 | # This file is part of zippy_config. 6 | # 7 | # zippy_config is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # zippy_config is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with zippy_config. If not, see . 19 | 20 | systemctl restart KlipperScreen -------------------------------------------------------------------------------- /shaper/ADXL_SHAPER.cfg: -------------------------------------------------------------------------------- 1 | # These macros require the gcode_shell_command extension. 2 | # https://github.com/th33xitus/kiauh/blob/master/docs/gcode_shell_command.md 3 | 4 | [gcode_macro ADXL_SHAPE_ALL] 5 | description: Test resonances for both axis 6 | gcode: 7 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 8 | HOME_IF_NEEDED 9 | SHAPER_CALIBRATE 10 | RUN_SHELL_COMMAND CMD=adxl_shape_x 11 | RUN_SHELL_COMMAND CMD=adxl_shape_y 12 | M118 Test done 13 | SAVE_AND_RESTART 14 | 15 | [gcode_macro ADXL_SHAPE_X] 16 | description: Test resonances for X axis 17 | gcode: 18 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 19 | HOME_IF_NEEDED 20 | SHAPER_CALIBRATE AXIS=x 21 | RUN_SHELL_COMMAND CMD=adxl_shape_x 22 | M118 Test done 23 | SAVE_AND_RESTART 24 | 25 | [gcode_macro ADXL_SHAPE_Y] 26 | description: Test resonances for Y axis 27 | gcode: 28 | M118 DO NOT TOUCH THE PRINTER UNTIL DONE!!! 29 | HOME_IF_NEEDED 30 | SHAPER_CALIBRATE AXIS=y 31 | RUN_SHELL_COMMAND CMD=adxl_shape_y 32 | M118 Test done 33 | SAVE_AND_RESTART 34 | 35 | [gcode_shell_command adxl_shape_x] 36 | command: sh ~/printer_data/config/shaper/adxl_shape_x.sh # edit: ´~/printer_data/config/shaper/´ to where your .sh file lays 37 | timeout: 60. 38 | verbose: True 39 | 40 | [gcode_shell_command adxl_shape_y] 41 | command: sh ~/printer_data/config/shaper/adxl_shape_y.sh # edit: ´~/printer_data/config/shaper/´ to where your .sh file lays 42 | timeout: 60. 43 | verbose: True 44 | 45 | ### name file: adxl_shape_x.sh 46 | #~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_x_*.csv -o ~/printer_data/config/shaper_calibrate_x.png 47 | 48 | ### name file: adxl_shape_y.sh 49 | #~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_y_*.csv -o ~/printer_data/config/shaper_calibrate_y.png 50 | -------------------------------------------------------------------------------- /shaper/adxl_shape_x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_x_*.csv -o ~/printer_data/config/shaper/shaper_calibrate_x.png -------------------------------------------------------------------------------- /shaper/adxl_shape_y.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ~/klipper/scripts/calibrate_shaper.py /tmp/calibration_data_y_*.csv -o ~/printer_data/config/shaper/shaper_calibrate_y.png -------------------------------------------------------------------------------- /sonar.conf: -------------------------------------------------------------------------------- 1 | #### Sonar - A WiFi Keepalive daemon 2 | #### 3 | #### Written by Stephan Wendel aka KwadFan 4 | #### Copyright 2022 5 | #### https://github.com/mainsail-crew/sonar 6 | #### 7 | #### This File is distributed under GPLv3 8 | #### 9 | 10 | [sonar] 11 | enable: true # false to disable till next reboot (will stop again if not set to true) 12 | debug_log: false # if set to true, sonar will log ever ping with triptime and date/time 13 | persistant_log: false # If true logs in /var/log/sonar.log, false logs to systemd 14 | target: auto # IP Address, URL or auto as ping target 15 | count: 3 # How often should be pinged? 16 | interval: 60 # Ping again after X seconds 17 | restart_treshold: 10 # If failed, restart WiFi after X seconds 18 | --------------------------------------------------------------------------------