#pragma once // clang-format off /* Custom configuration for ESP32-based CNC Controller with SD Card and additional features support. */ #define MACHINE_NAME "CDT" // Motor mappings to match the assigned GPIOs #define X_STEP_PIN GPIO_NUM_14 #define X_DIRECTION_PIN GPIO_NUM_27 #define Y_STEP_PIN GPIO_NUM_26 #define Y_DIRECTION_PIN GPIO_NUM_25 #define Z_STEP_PIN GPIO_NUM_33 #define Z_DIRECTION_PIN GPIO_NUM_32 // Limit switch mappings to match the assigned GPIOs #define X_LIMIT_PIN GPIO_NUM_16 #define Y_LIMIT_PIN GPIO_NUM_4 #define Z_LIMIT_PIN GPIO_NUM_15 // Uncomment and adjust the spindle and coolant mappings as needed //#define SPINDLE_TYPE SpindleType::RELAY //#define SPINDLE_OUTPUT_PIN GPIO_NUM_23 // Adjust if using //#define PROBE_PIN GPIO_NUM_22 // Adjust if using // Optional control pin mappings (uncomment and adjust if needed) /* #define CONTROL_SAFETY_DOOR_PIN GPIO_NUM_XX // Adjust if using #define CONTROL_RESET_PIN GPIO_NUM_XX // Adjust if using #define CONTROL_FEED_HOLD_PIN GPIO_NUM_XX // Adjust if using #define CONTROL_CYCLE_START_PIN GPIO_NUM_XX // Adjust if using */ // SD Card pin mappings corrected to match the table provided #define SD_CARD_CS_PIN GPIO_NUM_21 // Chip select line for SD card #define SD_CARD_MOSI_PIN GPIO_NUM_19 // Master Out Slave In line for SD card #define SD_CARD_MISO_PIN GPIO_NUM_17 // Master In Slave Out line for SD card #define SD_CARD_SCK_PIN GPIO_NUM_18 // Clock line for SD card // Ensure these pins match your hardware setup #define STEPPERS_DISABLE_PIN GPIO_NUM_13 // Adjust if using // Note: Make sure to connect the power lines and capacitors as mentioned in your comments for stability and proper operation. // clang-format on