; Custom Rostock Max V2 with Duet board

; Communication and general
M111 S0 ; Debug off
M550 MaxBurnV2    ; Machine name and Netbios name (can be anything you like)
M551 MaxBurnV2    ; Machine password (used for FTP)
M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xEE ; MAC Address
;*** Adjust the IP address and gateway in the following 2 lines to suit your network
M552 P192.168.1.254     ; IP address (0 = use DHCP)
M554 P192.168.1.195     ; Gateway
M553 P255.255.255.0     ; Netmask
M555 P2                 ; Set output to look like Marlin
G21                     ; Work in millimetres
G90                     ; Send absolute coordinates...
M83                     ; ...but relative extruder moves
;M575 P1 B115200 S1     ; Set auxillary serial port baud rate and require checksum (For PanelDue)

;Turn off fans
;M106 I1                     ; fans are inverting
;M106 P0 S0              ; Turn off Fan 0 (backward compatible with older firmware)
;M106 P1 S0              ; Turn off Fan 1
M106 P1 T30 S100         ; Activate Fan #1 if the extruder temp is over 30C.

; Axis and motor configuration
M569 P0 S0     ; X Drive 0 goes backwards
M569 P1 S1     ; Y Drive 1 goes backwards
M569 P2 S0     ; Z Drive 2 goes backwards
M569 P3 S1     ; E0 Drive 3 (extruder) goes backwards
;M569 P4 S1    ; E1 Drive 4 goes forwards
;M569 P5 S1    ; E2 Drive 5 goes forwards
;M569 P6 S1    ; E3 Drive 6 goes forwards
;M569 P7 S1    ; E4 Drive 7 goes forwards
;M569 P8 S1    ; E5 Drive 8 goes forwards - not used with 2-fans version of firmware.

M574 X2 Y2 Z2 S1    ; set endstop configuration (all endstops at high end, active high)

M665 L290.80 R143.44 H385.94 B140 X-0.75 Y-0.49 Z0          ; set diagonal rod length, delta radius, printable radius and homed height
M666 X-0.23 Y-0.51 Z0.74                                   ; put your endstop adjustments here, or let auto calibration find them
M92 X80 Y80 Z80                                            ; Set axis steps/mm
M906 X1000 Y1000 Z1000 E1500                 ; Set motor currents (mA); set each extruder explicitly
M201 X1000 Y1000 Z1000 E1000                 ; Accelerations (mm/s^2)
M203 X20000 Y20000 Z20000 E3600           ; Maximum speeds (mm/min)
M566 X1200 Y1200 Z1200 E1200                 ; Maximum instant speed changes mm/minute

; Thermistors
;*** If you have a Duet board stickered "4.7K", change R1000 to R4700 to the following M305 commands
M305 P0 T100000 B4286 R4700 H30 L0    ; Put your own H and/or L values here to set the bed thermistor ADC correction
M305 P1 T100000 B4388 R4700 H30 L0    ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction
M570 S180    ; Hot end may be a little slow to heat up so allow it 180 seconds

; PID

; Bed
M301 H0 P-1       ; negative P means use bang-bang control

; Heater 1
M301 H1 P20 I.027 D100 T1.1 S1 W300 B30

; Tool definitions
M563 P0 D0 H1     ; Define tool 0
G10 P0 S0 R0       ; Set tool 0 operating and standby temperatures
M92 E407.07              ; Set extruder steps per mm

; Z probe and compensation definition
;*** If you have an IR zprobe instead of a switch, change P4 to P1 in the following M558 command
M558 P4 X0 Y0 Z0 H5      ; Z probe is a switch and is not used for homing any axes
G31 X0 Y0 Z0                  ; Set the zprobe height and threshold (put your own values here)
;*** If you are using axis compensation, put the figures in the following command
M556 S78 X0 Y0 Z0              ; Axis compensation here
M208 S6 Z0                     ; set minimum Z
;
T0    ; select first hot end