mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-13 18:14:23 +02:00
Fixed platformIO compile problems
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -5,3 +5,5 @@ Thumbs.db
|
|||||||
embedded/node_modules
|
embedded/node_modules
|
||||||
embedded/dist
|
embedded/dist
|
||||||
*~
|
*~
|
||||||
|
.pio/
|
||||||
|
.vscode/
|
@@ -12,9 +12,9 @@
|
|||||||
#define Z_DIRECTION_PIN GPIO_NUM_33
|
#define Z_DIRECTION_PIN GPIO_NUM_33
|
||||||
|
|
||||||
#define LIMIT_MASK B111
|
#define LIMIT_MASK B111
|
||||||
#define X_AXIS_LIMIT_PIN GPIO_NUM_2 // labeled X Limit
|
#define X_LIMIT_PIN GPIO_NUM_2 // labeled X Limit
|
||||||
#define Y_AXIS_LIMIT_PIN GPIO_NUM_4 // labeled Y Limit
|
#define Y_LIMIT_PIN GPIO_NUM_4 // labeled Y Limit
|
||||||
#define Y_AXIS_LIMIT_PIN GPIO_NUM_15 // labeled Z Limit
|
#define Z_LIMIT_PIN GPIO_NUM_15 // labeled Z Limit
|
||||||
|
|
||||||
// OK to comment out to use pin for other features
|
// OK to comment out to use pin for other features
|
||||||
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
||||||
|
@@ -12,9 +12,9 @@
|
|||||||
#define Z_DIRECTION_PIN GPIO_NUM_33
|
#define Z_DIRECTION_PIN GPIO_NUM_33
|
||||||
|
|
||||||
#define LIMIT_MASK B111
|
#define LIMIT_MASK B111
|
||||||
#define X_AXIS_LIMIT_PIN GPIO_NUM_17
|
#define X_LIMIT_PIN GPIO_NUM_17
|
||||||
#define Y_AXIS_LIMIT_PIN GPIO_NUM_4
|
#define Y_LIMIT_PIN GPIO_NUM_4
|
||||||
#define Z_AXIS_LIMIT_PIN GPIO_NUM_16
|
#define Z_LIMIT_PIN GPIO_NUM_16
|
||||||
|
|
||||||
// OK to comment out to use pin for other features
|
// OK to comment out to use pin for other features
|
||||||
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
||||||
|
@@ -25,6 +25,10 @@
|
|||||||
#define MACHINE_NAME "MACHINE_ATARI_1020"
|
#define MACHINE_NAME "MACHINE_ATARI_1020"
|
||||||
|
|
||||||
// ================== CPU MAP ======================
|
// ================== CPU MAP ======================
|
||||||
|
#ifdef USE_RMT_STEPS
|
||||||
|
#undef USE_RMT_STEPS
|
||||||
|
#endif
|
||||||
|
|
||||||
#define USE_UNIPOLAR
|
#define USE_UNIPOLAR
|
||||||
|
|
||||||
#define X_UNIPOLAR
|
#define X_UNIPOLAR
|
||||||
@@ -69,7 +73,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef INVERT_CONTROL_PIN_MASK
|
#ifdef INVERT_CONTROL_PIN_MASK
|
||||||
#undef IGNORE_CONTROL_PINS
|
#undef INVERT_CONTROL_PIN_MASK
|
||||||
#endif
|
#endif
|
||||||
#define INVERT_CONTROL_PIN_MASK B01110000
|
#define INVERT_CONTROL_PIN_MASK B01110000
|
||||||
|
|
||||||
|
@@ -42,16 +42,16 @@
|
|||||||
// for all the things that can go here
|
// for all the things that can go here
|
||||||
|
|
||||||
// Assign CPU pins to machine functions, for example:
|
// Assign CPU pins to machine functions, for example:
|
||||||
// #define X_STEP_PIN GPIO_NUM_12
|
#define X_STEP_PIN GPIO_NUM_12
|
||||||
// #define X_DIRECTION_PIN GPIO_NUM_26
|
#define X_DIRECTION_PIN GPIO_NUM_26
|
||||||
// #define X_AXIS_LIMIT_PIN GPIO_NUM_2
|
#define X_LIMIT_PIN GPIO_NUM_2
|
||||||
|
|
||||||
// #define SPINDLE_PWM_PIN GPIO_NUM_17
|
// #define SPINDLE_PWM_PIN GPIO_NUM_17
|
||||||
|
|
||||||
// #define CONTROL_SAFETY_DOOR_PIN GPIO_NUM_35
|
// #define CONTROL_SAFETY_DOOR_PIN GPIO_NUM_35
|
||||||
|
|
||||||
// Set the number of bits to the number of limit switches
|
// Set the number of bits to the number of limit switches
|
||||||
// #define LIMIT_MASK B111
|
#define LIMIT_MASK B111
|
||||||
|
|
||||||
// ============== Enable custom features =======================
|
// ============== Enable custom features =======================
|
||||||
|
|
||||||
|
@@ -15,3 +15,7 @@
|
|||||||
#define MACHINE_NAME "MACHINE_DEFAULT - Demo Only No I/O!"
|
#define MACHINE_NAME "MACHINE_DEFAULT - Demo Only No I/O!"
|
||||||
|
|
||||||
#define LIMIT_MASK 0 // no limit pins
|
#define LIMIT_MASK 0 // no limit pins
|
||||||
|
|
||||||
|
#ifdef USE_RMT_STEPS
|
||||||
|
#undef USE_RMT_STEPS // Suppress unused variable warning
|
||||||
|
#endif
|
||||||
|
@@ -41,6 +41,53 @@ Some features should not be changed. See notes below.
|
|||||||
|
|
||||||
// It is no longer necessary to edit this file to choose
|
// It is no longer necessary to edit this file to choose
|
||||||
// a machine configuration; edit machine.h instead
|
// a machine configuration; edit machine.h instead
|
||||||
|
// machine.h is #included below, after some definitions
|
||||||
|
// that the machine file might choose to undefine.
|
||||||
|
|
||||||
|
// Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode
|
||||||
|
// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short
|
||||||
|
// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed
|
||||||
|
// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If
|
||||||
|
// an axis is omitted from the defines, it will not home, nor will the system update its position.
|
||||||
|
// Meaning that this allows for users with non-standard Cartesian machines, such as a lathe (x then z,
|
||||||
|
// with no y), to configure the homing cycle behavior to their needs.
|
||||||
|
// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same
|
||||||
|
// cycle, but this requires some pin settings changes in the machine definition file. For example, the default homing
|
||||||
|
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles.
|
||||||
|
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins
|
||||||
|
// may be reduced to one pin, if all axes are homed with separate cycles, or vice versa, all three axes
|
||||||
|
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
|
||||||
|
// will not be affected by pin sharing.
|
||||||
|
|
||||||
|
// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y.
|
||||||
|
// These homing cycle definitions precede the machine.h file so that the machine
|
||||||
|
// definition can undefine them if necessary.
|
||||||
|
#define HOMING_CYCLE_0 (1<<Z_AXIS) // TYPICALLY REQUIRED: First move Z to clear workspace.
|
||||||
|
#define HOMING_CYCLE_1 (1<<X_AXIS)
|
||||||
|
#define HOMING_CYCLE_2 (1<<Y_AXIS)
|
||||||
|
|
||||||
|
// NOTE: The following is for for homing X and Y at the same time
|
||||||
|
// #define HOMING_CYCLE_0 (1<<Z_AXIS) // first home z by itself
|
||||||
|
// #define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS)) // Homes both X-Y in one cycle. NOT COMPATIBLE WITH COREXY!!!
|
||||||
|
|
||||||
|
// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
|
||||||
|
// normally-closed switches on the specified pins, rather than the default normally-open switches.
|
||||||
|
// The mask order is Cycle Start | Feed Hold | Reset | Safety Door
|
||||||
|
// For example B1101 will invert the function of the Reset pin.
|
||||||
|
#define INVERT_CONTROL_PIN_MASK B1111
|
||||||
|
|
||||||
|
// This allows control pins to be ignored.
|
||||||
|
// Since these are typically used on the pins that don't have pullups, they will float and cause
|
||||||
|
// problems if not externally pulled up. Ignoring will always return not activated when read.
|
||||||
|
#define IGNORE_CONTROL_PINS
|
||||||
|
|
||||||
|
#define ENABLE_CONTROL_SW_DEBOUNCE // Default disabled. Uncomment to enable.
|
||||||
|
#define CONTROL_SW_DEBOUNCE_PERIOD 32 // in milliseconds default 32 microseconds
|
||||||
|
|
||||||
|
#define USE_RMT_STEPS
|
||||||
|
|
||||||
|
// Include the file that loads the machine-specific config file.
|
||||||
|
// machine.h must be edited to choose the desired file.
|
||||||
#include "machine.h"
|
#include "machine.h"
|
||||||
|
|
||||||
// machine_common.h contains settings that do not change
|
// machine_common.h contains settings that do not change
|
||||||
@@ -167,30 +214,6 @@ Some features should not be changed. See notes below.
|
|||||||
// mainly a safety feature to remind the user to home, since position is unknown to Grbl.
|
// mainly a safety feature to remind the user to home, since position is unknown to Grbl.
|
||||||
#define HOMING_INIT_LOCK // Comment to disable
|
#define HOMING_INIT_LOCK // Comment to disable
|
||||||
|
|
||||||
// Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode
|
|
||||||
// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short
|
|
||||||
// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed
|
|
||||||
// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If
|
|
||||||
// an axis is omitted from the defines, it will not home, nor will the system update its position.
|
|
||||||
// Meaning that this allows for users with non-standard Cartesian machines, such as a lathe (x then z,
|
|
||||||
// with no y), to configure the homing cycle behavior to their needs.
|
|
||||||
// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same
|
|
||||||
// cycle, but this requires some pin settings changes in the machine definition file. For example, the default homing
|
|
||||||
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles.
|
|
||||||
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins
|
|
||||||
// may be reduced to one pin, if all axes are homed with separate cycles, or vice versa, all three axes
|
|
||||||
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
|
|
||||||
// will not be affected by pin sharing.
|
|
||||||
|
|
||||||
// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y.
|
|
||||||
#define HOMING_CYCLE_0 (1<<Z_AXIS) // TYPICALLY REQUIRED: First move Z to clear workspace.
|
|
||||||
#define HOMING_CYCLE_1 (1<<X_AXIS)
|
|
||||||
#define HOMING_CYCLE_2 (1<<Y_AXIS)
|
|
||||||
|
|
||||||
// NOTE: The following is for for homingg X and Y at the same time
|
|
||||||
// #define HOMING_CYCLE_0 (1<<Z_AXIS) // first home z by itself
|
|
||||||
// #define HOMING_CYCLE_1 ((1<<X_AXIS)|(1<<Y_AXIS)) // Homes both X-Y in one cycle. NOT COMPATIBLE WITH COREXY!!!
|
|
||||||
|
|
||||||
// Number of homing cycles performed after when the machine initially jogs to limit switches.
|
// Number of homing cycles performed after when the machine initially jogs to limit switches.
|
||||||
// This help in preventing overshoot and should improve repeatability. This value should be one or
|
// This help in preventing overshoot and should improve repeatability. This value should be one or
|
||||||
// greater.
|
// greater.
|
||||||
@@ -286,21 +309,6 @@ Some features should not be changed. See notes below.
|
|||||||
// Enable using a solenoid for the Z axis on a pen type machine
|
// Enable using a solenoid for the Z axis on a pen type machine
|
||||||
// #define USE_PEN_SOLENOID
|
// #define USE_PEN_SOLENOID
|
||||||
|
|
||||||
// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
|
|
||||||
// normally-closed switches on the specified pins, rather than the default normally-open switches.
|
|
||||||
// The mask order is Cycle Start | Feed Hold | Reset | Safety Door
|
|
||||||
// For example B1101 will invert the function of the Reset pin.
|
|
||||||
#define INVERT_CONTROL_PIN_MASK B1111
|
|
||||||
|
|
||||||
// This allows control pins to be ignored.
|
|
||||||
// Since these are typically used on the pins that don't have pullups, they will float and cause
|
|
||||||
// problems if not externally pulled up. Ignoring will always return not activated when read.
|
|
||||||
#define IGNORE_CONTROL_PINS
|
|
||||||
|
|
||||||
#define ENABLE_CONTROL_SW_DEBOUNCE // Default disabled. Uncomment to enable.
|
|
||||||
#define CONTROL_SW_DEBOUNCE_PERIOD 32 // in milliseconds default 32 microseconds
|
|
||||||
|
|
||||||
|
|
||||||
// Inverts select limit pin states based on the following mask. This effects all limit pin functions,
|
// Inverts select limit pin states based on the following mask. This effects all limit pin functions,
|
||||||
// such as hard limits and homing. However, this is different from overall invert limits setting.
|
// such as hard limits and homing. However, this is different from overall invert limits setting.
|
||||||
// This build option will invert only the limit pins defined here, and then the invert limits setting
|
// This build option will invert only the limit pins defined here, and then the invert limits setting
|
||||||
|
@@ -261,7 +261,7 @@
|
|||||||
#ifndef DEFAULT_Z_MAX_TRAVEL
|
#ifndef DEFAULT_Z_MAX_TRAVEL
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_Z_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
||||||
#endif
|
#endif
|
||||||
#ifndef DEFAULT_A_TRAVEL
|
#ifndef DEFAULT_A_MAX_TRAVEL
|
||||||
#define DEFAULT_A_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
#define DEFAULT_A_MAX_TRAVEL 300.0 // mm NOTE: Must be a positive value.
|
||||||
#endif
|
#endif
|
||||||
#ifndef DEFAULT_B_MAX_TRAVEL
|
#ifndef DEFAULT_B_MAX_TRAVEL
|
||||||
|
@@ -23,13 +23,14 @@
|
|||||||
|
|
||||||
#ifdef USE_TRINAMIC
|
#ifdef USE_TRINAMIC
|
||||||
/*
|
/*
|
||||||
The drivers can use SPI daisy chaining to allow the use of only (1) CS_PIN.
|
The drivers can use SPI daisy chaining to allow the use of a single CS_PIN.
|
||||||
The PCB must be designed for this, with SDO pins being coonect to the
|
The PCB must be designed for this, with SDO pins connected to the
|
||||||
next driver's SDI pin. The final SDO goes back to the controller.
|
next driver's SDI pin and the final SDO going back to the CPU.
|
||||||
|
|
||||||
This is setup in the machine definition file (Machines/*.h).
|
To set this up, #define TRINAMIC_DAISY_CHAIN in your machine definition
|
||||||
add #define TRINAMIC_DAISY_CHAIN to your map
|
file (Machines/something.h).
|
||||||
Make every axis CS_PIN definition be for the same pin like this...
|
|
||||||
|
Set the CS_PIN definition for every axis to the same pin, like this...
|
||||||
#define X_CS_PIN GPIO_NUM_17
|
#define X_CS_PIN GPIO_NUM_17
|
||||||
#define Y_CS_PIN GPIO_NUM_17
|
#define Y_CS_PIN GPIO_NUM_17
|
||||||
...etc.
|
...etc.
|
||||||
|
@@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
// For actual use, select the appropriate board from Machines/,
|
// For actual use, select the appropriate board from Machines/,
|
||||||
// or create your own, for example:
|
// or create your own, for example:
|
||||||
// #include "Machines/3x_v4.h"
|
#include "Machines/3x_v4.h"
|
||||||
#include "Machines/spi_daisy_4x.h"
|
|
||||||
|
|
||||||
// Some configurations use two files, the first assigning pins
|
// Some configurations use two files, the first assigning pins
|
||||||
// and the second providing additional customization, for example:
|
// and the second providing additional customization, for example:
|
||||||
@@ -31,4 +30,4 @@
|
|||||||
|
|
||||||
// Paste default settings override definitions here.
|
// Paste default settings override definitions here.
|
||||||
|
|
||||||
#endif _machine_h
|
#endif // _machine_h
|
||||||
|
@@ -1,8 +1,6 @@
|
|||||||
#ifndef _machine_common_h
|
#ifndef _machine_common_h
|
||||||
#define _machine_common_h
|
#define _machine_common_h
|
||||||
|
|
||||||
#define USE_RMT_STEPS
|
|
||||||
|
|
||||||
#ifndef SPINDLE_PWM_BIT_PRECISION
|
#ifndef SPINDLE_PWM_BIT_PRECISION
|
||||||
#define SPINDLE_PWM_BIT_PRECISION 8
|
#define SPINDLE_PWM_BIT_PRECISION 8
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,15 +32,33 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef SOLENOID_PWM_FREQ
|
||||||
#define SOLENOID_PWM_FREQ 5000
|
#define SOLENOID_PWM_FREQ 5000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_PWM_RES_BITS
|
||||||
#define SOLENOID_PWM_RES_BITS 8
|
#define SOLENOID_PWM_RES_BITS 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_TURNON_DELAY
|
||||||
#define SOLENOID_TURNON_DELAY (SOLENOID_TIMER_INT_FREQ/2)
|
#define SOLENOID_TURNON_DELAY (SOLENOID_TIMER_INT_FREQ/2)
|
||||||
#define SOLENOID_PULSE_LEN_UP 255
|
#endif
|
||||||
#define SOLENOID_HOLD_DELAY (SOLENOID_TIMER_INT_FREQ/2) // in task counts...after this delay power will change to hold level
|
|
||||||
#define SOLENOID_PULSE_LEN_HOLD 80 // solenoid hold level ... typically a lower value to prevent overheating
|
|
||||||
|
|
||||||
|
#ifndef SOLENOID_PULSE_LEN_UP
|
||||||
|
#define SOLENOID_PULSE_LEN_UP 255
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_HOLD_DELAY
|
||||||
|
#define SOLENOID_HOLD_DELAY (SOLENOID_TIMER_INT_FREQ/2) // in task counts...after this delay power will change to hold level
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_PULSE_LEN_HOLD
|
||||||
|
#define SOLENOID_PULSE_LEN_HOLD 80 // solenoid hold level ... typically a lower value to prevent overheating
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_TIMER_INT_FREQ
|
||||||
#define SOLENOID_TIMER_INT_FREQ 50
|
#define SOLENOID_TIMER_INT_FREQ 50
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef solenoid_h
|
#ifndef solenoid_h
|
||||||
#define solenoid_h
|
#define solenoid_h
|
||||||
|
@@ -21,6 +21,7 @@ lib_deps_builtin =
|
|||||||
WiFiClientSecure
|
WiFiClientSecure
|
||||||
|
|
||||||
[env:nodemcu-32s]
|
[env:nodemcu-32s]
|
||||||
|
lib_deps = TMCStepper
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = nodemcu-32s
|
board = nodemcu-32s
|
||||||
framework = arduino
|
framework = arduino
|
||||||
|
Reference in New Issue
Block a user