mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-09 22:01:14 +02:00
Added spindle/laser PWM secition to CPU_MAP_TMC2130_PEN
This commit is contained in:
@@ -837,6 +837,7 @@
|
||||
#define USE_SERVO_AXES
|
||||
#endif
|
||||
|
||||
|
||||
#define SERVO_Z_PIN GPIO_NUM_27
|
||||
#define SERVO_Z_CHANNEL_NUM 5
|
||||
#define SERVO_Z_RANGE_MIN 0.0
|
||||
@@ -845,17 +846,13 @@
|
||||
#define SERVO_Z_HOME_POS SERVO_Z_RANGE_MAX // move to max during homing
|
||||
#define SERVO_Z_MPOS false // will not use mpos, uses work coordinates
|
||||
|
||||
// *** the flood coolant feature code is activated by defining this pins
|
||||
// *** Comment it out to use the pin for other features
|
||||
//#define COOLANT_FLOOD_PIN GPIO_NUM_16
|
||||
//#define COOLANT_MIST_PIN GPIO_NUM_21
|
||||
|
||||
// If SPINDLE_PWM_PIN is commented out, this frees up the pin, but Grbl will still
|
||||
// use a virtual spindle. Do not comment out the other parameters for the spindle.
|
||||
//#define SPINDLE_PWM_PIN GPIO_NUM_17
|
||||
// Comment out servo pin and uncomment spindle pwm pin to use the servo PWM to control a spindle
|
||||
/*
|
||||
#define SPINDLE_PWM_PIN GPIO_NUM_27
|
||||
#define SPINDLE_PWM_CHANNEL 0
|
||||
#define SPINDLE_PWM_BIT_PRECISION 8 // be sure to match this with SPINDLE_PWM_MAX_VALUE
|
||||
|
||||
*/
|
||||
|
||||
// #define X_LIMIT_PIN See version section
|
||||
#define Y_LIMIT_PIN GPIO_NUM_4
|
||||
|
@@ -32,7 +32,7 @@ void spindle_init()
|
||||
{
|
||||
|
||||
#ifdef SPINDLE_PWM_PIN
|
||||
|
||||
grbl_sendf(CLIENT_SERIAL, "[MSG:Spindle init on pin %d]\r\n", SPINDLE_PWM_PIN);
|
||||
#ifdef INVERT_SPINDLE_PWM
|
||||
grbl_send(CLIENT_SERIAL, "[MSG: INVERT_SPINDLE_PWM]\r\n");
|
||||
#endif
|
||||
@@ -70,7 +70,7 @@ void spindle_init()
|
||||
ledcAttachPin(SPINDLE_PWM_PIN, SPINDLE_PWM_CHANNEL); // attach the PWM to the pin
|
||||
|
||||
// Start with spindle off off
|
||||
spindle_stop();
|
||||
spindle_stop();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ uint8_t spindle_get_state() // returns SPINDLE_STATE_DISABLE, SPINDLE_STATE_CW
|
||||
}
|
||||
|
||||
void spindle_set_speed(uint32_t pwm_value)
|
||||
{
|
||||
{
|
||||
#ifndef SPINDLE_PWM_PIN
|
||||
//grbl_sendf(CLIENT_SERIAL, "[MSG: set speed...no pin defined]\r\n");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user