board: PiBot V4.7B
name: 3040L CNC
meta: v1.0.0
stepping:
  engine: I2S_STREAM
  idle_ms: 254
  pulse_us: 4
  dir_delay_us: 1
  disable_delay_us: 0

axes:
  shared_stepper_disable_pin: NO_PIN
  x:
    steps_per_mm: 1000
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 400
    max_travel_mm: 230
    soft_limits: true
    homing:
      cycle: 2
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 1000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.33:low
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.2
        direction_pin: I2SO.1
        disable_pin: I2SO.0

  y:
    steps_per_mm: 1000
    max_rate_mm_per_min: 2000
    acceleration_mm_per_sec2: 400
    max_travel_mm: 350
    soft_limits: true
    homing:
      cycle: 2
      positive_direction: false
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 1000.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: gpio.32:low
      limit_pos_pin: NO_PIN
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.5
        direction_pin: I2SO.4
        disable_pin: I2SO.7

  z:
    steps_per_mm: 1000.000
    max_rate_mm_per_min: 1500.000
    acceleration_mm_per_sec2: 50.000
    max_travel_mm: 125.000
    soft_limits: true
    homing:
      cycle: 1
      positive_direction: true
      mpos_mm: 0.000
      feed_mm_per_min: 100.000
      seek_mm_per_min: 800.000
      settle_ms: 500
      seek_scaler: 1.100
      feed_scaler: 1.100

    motor0:
      limit_neg_pin: NO_PIN
      limit_pos_pin: gpio.34:low
      limit_all_pin: NO_PIN
      hard_limits: false
      pulloff_mm: 1.000
      standard_stepper:
        step_pin: I2SO.10
        direction_pin: I2SO.9:low
        disable_pin: I2SO.8

i2so:
  bck_pin: gpio.22
  data_pin: gpio.21
  ws_pin: gpio.17

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

sdcard:
  card_detect_pin: NO_PIN
  cs_pin: gpio.5

parking:
  enable: true
  axis: Z
  pullout_distance_mm: 5.000
  pullout_rate_mm_per_min: 250.000
  target_mpos_mm: -5.000
  rate_mm_per_min: 800.000

control:
  # NOTE: safety_door_pin is repurposed as coolant flow monitor.
  # "Door opened" status = NO COOLANT FLOW detected.
 safety_door_pin: gpio.35:high

probe:
  pin: gpio.36:low
  toolsetter_pin: gpio.39:high
  check_mode_start: true
  hard_stop: false
  probe_hard_limit: true

atc_manual:
  safe_z_mpos_mm: -5.000
  probe_seek_rate_mm_per_min: 300.000
  probe_feed_rate_mm_per_min: 80.000
  change_mpos_mm: 0.000 0.000 -5.000
  ets_mpos_mm: 0.000 0.000 -105.000
  ets_rapid_z_mpos_mm: -60.000

start:
  must_home: false

# Begin OLED
i2c0:
   sda_pin: gpio.27
   scl_pin: gpio.25

oled:
   i2c_num: 0
   i2c_address: 60
   width: 128
   height: 64
   radio_delay_ms: 1000

# Using MOSFETs
coolant:
  flood_pin: gpio.12
  mist_pin: gpio.4
  delay_ms: 0

################################################################################################################################

# Begin Huanyang RS485
# uart1:
#   txd_pin: gpio.15
#   rxd_pin: gpio.16
#   rts_pin: gpio.14
#   baud: 9600
#   mode: 8N1

# Huanyang:
#   uart_num: 1
#   modbus_id: 1
#   tool_num: 1
#   speed_map: 0=0% 0=25% 6000=25% 24000=100%
#   off_on_alarm: true

# Begin 10V
10V:
  forward_pin: gpio.15
  reverse_pin: gpio.14
  pwm_hz: 5000
  output_pin: gpio.13
  enable_pin: NO_PIN
  direction_pin: NO_PIN
  disable_with_s0: false
  s0_with_disable: true
  spinup_ms: 10000
  spindown_ms: 0
  tool_num: 0
  speed_map: 0=0% 0=25% 6000=25% 24000=100%
  off_on_alarm: false
  atc: atc_manual

# End of File
