Skip to content

Instantly share code, notes, and snippets.

@pddenhar
Created April 28, 2024 19:18
Show Gist options
  • Save pddenhar/0b1b6550b52b352125b13757393988ff to your computer and use it in GitHub Desktop.
Save pddenhar/0b1b6550b52b352125b13757393988ff to your computer and use it in GitHub Desktop.
# This file contains common pin mappings for the FlashForge-Creator-Pro
# To use this config, the firmware should be compiled for
# the Atmel atmega2560.
# Use the following command to flash the board:
# avrdude -c stk500v2 -p m2560 -P /dev/serial/by-id/usb-MakerBot_Industries_The_Replicator_557373136313514061A2-if00 -b 57600 -D -U out/klipper.elf.hex
# See docs/Config_Reference.md for a description of parameters.
[include mainsail.cfg]
[stepper_x]
step_pin: PF1
dir_pin: !PF0
enable_pin: !PF2
microsteps: 16
rotation_distance: 34
endstop_pin: ^!PL1
position_endstop: 116
position_max: 116
position_min: -150
homing_speed: 50
[stepper_y]
step_pin: PF5
dir_pin: !PF4
enable_pin: !PF6
microsteps: 16
rotation_distance: 34
endstop_pin: ^!PL3
position_endstop: 80
position_max: 80
position_min: -80
homing_speed: 50
[stepper_z]
step_pin: PK1
dir_pin: !PK0
enable_pin: !PK2
microsteps: 16
rotation_distance: 8
endstop_pin: !PL6
#position_endstop: -0.25
position_max: 181
position_min: -0.25
[extruder]
pressure_advance: 0.142
step_pin: PA3
dir_pin: !PA2
enable_pin: !PA4
microsteps: 16
rotation_distance: 33
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PH3
sensor_type: MAX6675
sensor_pin: PE3
spi_software_miso_pin: PE5
spi_software_sclk_pin: PE2
spi_software_mosi_pin: PA1 #dummy mosi pin
control: pid
pid_kp: 27.341
pid_ki: 1.293
pid_kd: 144.566
min_temp: 0
max_temp: 260
[extruder1]
pressure_advance: 0.142
step_pin: PA7
dir_pin: PA6
enable_pin: !PG2
microsteps: 16
rotation_distance: 33
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB5
sensor_type: MAX6675
sensor_pin: PE4
spi_software_miso_pin: PE5
spi_software_sclk_pin: PE2
spi_software_mosi_pin: PA1 #dummy mosi pin
control: pid
pid_kp: 27.341
pid_ki: 1.293
pid_kd: 144.566
min_temp: 0
max_temp: 260
[gcode_macro T0]
gcode:
SET_GCODE_OFFSET X=-34
ACTIVATE_EXTRUDER EXTRUDER=extruder
[gcode_macro T1]
gcode:
SET_GCODE_OFFSET X=0
ACTIVATE_EXTRUDER EXTRUDER=extruder1
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
# Raise nozzle by 10mm
G1 Z5 E-3 F300
G1 X-2 Y-2 F300
G1 Z5 F3000
G90
# Disable steppers
M84
[heater_fan extruder_fan]
pin: PH4
heater: extruder
[heater_fan extruder1_fan]
pin: PB6
heater: extruder1
[fan]
pin: PL5
[heater_bed]
heater_pin: PL4
sensor_type: ATC Semitec 104GT-2
sensor_pin: PK7
control: pid
pid_kp: 72.914
pid_ki: 2.060
pid_kd: 645.290
min_temp: 0
max_temp: 130
[mcu]
serial: /dev/serial/by-id/usb-MakerBot_Industries_The_Replicator_85830303539351013041-if00
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 1000
max_z_velocity: 5
max_z_accel: 100
[mcp4018 x_axis_pot]
scl_pin: PJ5
sda_pin: PF3
wiper: 118
scale: 127
[mcp4018 y_axis_pot]
scl_pin: PJ5
sda_pin: PF7
wiper: 118
scale: 127
[mcp4018 z_axis_pot]
scl_pin: PJ5
sda_pin: PK3
wiper: 40
scale: 127
[mcp4018 a_axis_pot]
scl_pin: PJ5
sda_pin: PA5
wiper: 118
scale: 127
[mcp4018 b_axis_pot]
scl_pin: PJ5
sda_pin: PJ6
wiper: 118
scale: 127
[display]
lcd_type: hd44780_spi
spi_software_mosi_pin: PC3
spi_software_sclk_pin: PC2
#miso not used, dummy pin.
spi_software_miso_pin: PJ1
latch_pin: PC4
click_pin: ^PJ0
back_pin: ^PJ2
up_pin: ^PJ4
down_pin: ^PJ3
[pca9533 led_strip]
i2c_bus: twi
i2c_address: 98
initial_RED: 1
initial_GREEN: 1
initial_BLUE: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment