board: MKS TinyBee V1.0_001
name: K40 Laser
meta: (01.02.2022) by Skorpi

kinematics:
  Cartesian:

stepping:
  engine: I2S_STATIC
  idle_ms: 0
  pulse_us: 4
  dir_delay_us: 1
  disable_delay_us: 0

axes:
  x:
    # X
    steps_per_mm: 157.750
    max_rate_mm_per_min: 18000.000
    acceleration_mm_per_sec2: 1500.000
    max_travel_mm: 325.000
    soft_limits: true
    homing:
      cycle: 0
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 300.000
      seek_mm_per_min: 5000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.33
      hard_limits: false
      pulloff_mm: 2.000
      stepstick:
        step_pin: I2SO.1
        direction_pin: I2SO.2
        disable_pin: I2SO.0

  y:
    # Y
    steps_per_mm: 157.750
    max_rate_mm_per_min: 12000.000
    acceleration_mm_per_sec2: 300.000
    max_travel_mm: 220.000
    soft_limits: true
    homing:
      cycle: 1
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 300.000
      seek_mm_per_min: 5000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.32
      hard_limits: false
      pulloff_mm: 2.000
      stepstick:
        step_pin: I2SO.4
        direction_pin: I2SO.5
        disable_pin: I2SO.3

  z:
    # Z
    steps_per_mm: 157.750
    max_rate_mm_per_min: 12000.000
    acceleration_mm_per_sec2: 500.000
    max_travel_mm: 80.000
    soft_limits: true
    homing:
      cycle: 0
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 300.000
      seek_mm_per_min: 1000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.22
      hard_limits: false
      pulloff_mm: 1.000
      stepstick:
        step_pin: I2SO.7
        direction_pin: I2SO.8
        disable_pin: I2SO.6

#  a:
#    # E0
#    steps_per_mm: 157.750
#    max_rate_mm_per_min: 18000.000
#    acceleration_mm_per_sec2: 1500.000
#    max_travel_mm: 325.000
#    soft_limits: true
#    homing:
#      cycle: 1
#      positive_direction: false
#      mpos_mm: 0.000
#      feed_mm_per_min: 300.000
#      seek_mm_per_min: 5000.000
#      settle_ms: 500
#      seek_scaler: 1.100
#      feed_scaler: 1.100
#
#    motor0:
#      limit_neg_pin: gpio.35
#      hard_limits: false
#      pulloff_mm: 2.000
#      stepstick:
#        step_pin: I2SO.10
#        direction_pin: I2SO.11:low
#        disable_pin: I2SO.9

#  b:
#    # E1
#    steps_per_mm: 157.750
#    max_rate_mm_per_min: 12000.000
#    acceleration_mm_per_sec2: 500.000
#    max_travel_mm: 80.000
#    soft_limits: true
#    homing:
#      cycle: 0
#      positive_direction: false
#      mpos_mm: 0.000
#      feed_mm_per_min: 300.000
#      seek_mm_per_min: 1000.000
#      settle_ms: 500
#      seek_scaler: 1.100
#      feed_scaler: 1.100
#
#    motor0:
#      limit_neg_pin: gpio.2
#      hard_limits: false
#      pulloff_mm: 1.000
#      stepstick:
#        step_pin: I2SO.13
#        direction_pin: I2SO.14
#        disable_pin: I2SO.12

i2so:
  bck_pin: gpio.25
  data_pin: gpio.27
  ws_pin: gpio.26

spi:
  miso_pin: gpio.19
  mosi_pin: gpio.23
  sck_pin: gpio.18

sdcard:
  cs_pin: gpio.5
  card_detect_pin: NO_PIN

control:
  safety_door_pin: NO_PIN
  reset_pin: NO_PIN
  feed_hold_pin: NO_PIN
  cycle_start_pin: NO_PIN
  # EXP1 BTN_ENC
  macro0_pin: gpio.4:low:pu
  macro1_pin: NO_PIN
  macro2_pin: NO_PIN
  macro3_pin: NO_PIN

macros:
  startup_line0:
  startup_line1:
  macro0: $SD/Run=lasertest.gcode
  macro1: $SD/Run=home.gcode
  macro2:
  macro3:

coolant:
  flood_pin: NO_PIN
  mist_pin: NO_PIN
  delay_ms: 0

#probe:
#  pin: gpio.2
#  check_mode_start: true

Laser:
  pwm_hz: 5000
  # EXP1 BTN_ENC
  output_pin: gpio.13
  # FAN1
  enable_pin: I2SO.16
  disable_with_s0: false
  s0_with_disable: false
  tool_num: 0
  speed_map: 0=0.000% 0=12.500% 1700=100.000%
# 135=0mA 270=5mA 400=10mA 700=16mA
user_outputs:
  analog0_pin: NO_PIN
  analog1_pin: NO_PIN
  analog2_pin: NO_PIN
  analog3_pin: NO_PIN
  analog0_hz: 5000
  analog1_hz: 5000
  analog2_hz: 5000
  analog3_hz: 5000
  digital0_pin: NO_PIN
  digital1_pin: NO_PIN
  digital2_pin: NO_PIN
  digital3_pin: NO_PIN

start:
  must_home: false

 # USB  TX0(1)  RX0(3)
 # J3-> TX2(17) RX2(16)
 # J1-> I2SO.23 I2SO.22
 # TH1(36)        TH2(34)        THB(39)
 # HE0(I2SO.17)   HE1(I2SO.18)   HBED(I2SO.16)
 # FAN1(I2SO.19)  FAN2(I2SO.20)
 #                   EXP1                                   EXP2
 #(BEEPER) I2SO.21 | 1  2 | 13 (BTN_ENC)    (SPI MISO) 19 | 1  2 | 18 (SPI SCK)
 #    (LCD_EN)  21 | 3  4 |  4 (LCD_RS)      (BTN_EN1) 14 | 3  4 |  5 (SPI CS)
 #    (LCD_D4)   0 | 5  6   16 (LCD_D5)      (BTN_EN2) 12 | 5  6   23 (SPI MOSI)
 #    (LCD_D6)  15 | 7  8 | 17 (LCD_D7)      (SPI_DET) 34 | 7  8 | RESET
 #             GND | 9 10 | 5V                        GND | 9 10 | 3.3V
