Skip to content

Instantly share code, notes, and snippets.

@jschoch
Last active August 10, 2020 21:08
Show Gist options
  • Save jschoch/90c695ced0146bb0ccefcd825b24458a to your computer and use it in GitHub Desktop.
Save jschoch/90c695ced0146bb0ccefcd825b24458a to your computer and use it in GitHub Desktop.
debug stuff
18LTS schoch@xeon:/mnt/c/Users/jesse/Documents/Arduino/i2s_grbl/Grbl_Esp32/Grbl_Esp32$ git diff origin/master > diff.out
18LTS schoch@xeon:/mnt/c/Users/jesse/Documents/Arduino/i2s_grbl/Grbl_Esp32/Grbl_Esp32$ cat diff.out
diff --git a/Grbl_Esp32/config.h b/Grbl_Esp32/config.h
index e50f210..239c565 100644
--- a/Grbl_Esp32/config.h
+++ b/Grbl_Esp32/config.h
@@ -114,19 +114,19 @@ Some features should not be changed. See notes below.
//CONFIGURE_EYECATCH_BEGIN (DO NOT MODIFY THIS LINE)
#define ENABLE_BLUETOOTH // enable bluetooth
-#define ENABLE_SD_CARD // enable use of SD Card to run jobs
+//#define ENABLE_SD_CARD // enable use of SD Card to run jobs
-#define ENABLE_WIFI //enable wifi
+//#define ENABLE_WIFI //enable wifi
#if defined(ENABLE_WIFI) || defined(ENABLE_BLUETOOTH)
#define WIFI_OR_BLUETOOTH
#endif
-#define ENABLE_HTTP //enable HTTP and all related services
-#define ENABLE_OTA //enable OTA
-#define ENABLE_TELNET //enable telnet
-#define ENABLE_TELNET_WELCOME_MSG //display welcome string when connect to telnet
+//#define ENABLE_HTTP //enable HTTP and all related services
+//#define ENABLE_OTA //enable OTA
+//#define ENABLE_TELNET //enable telnet
+//#define ENABLE_TELNET_WELCOME_MSG //display welcome string when connect to telnet
#define ENABLE_MDNS //enable mDNS discovery
#define ENABLE_SSDP //enable UPNP discovery
#define ENABLE_NOTIFICATIONS //enable notifications
@@ -138,7 +138,7 @@ Some features should not be changed. See notes below.
// WebUI come up automatically in the browser, instead of requiring the user
// to browse manually to a default URL. It works like airport and hotel
// WiFi that takes you a special page as soon as you connect to that AP.
-#define ENABLE_CAPTIVE_PORTAL
+//#define ENABLE_CAPTIVE_PORTAL
// Warning! The current authentication implementation is too weak to provide
// security against an attacker, since passwords are stored and transmitted
@@ -438,7 +438,7 @@ Some features should not be changed. See notes below.
// NOTE: All pins associated with the feature are disabled, i.e. XYZ limit pins, not individual axes.
// WARNING: When the pull-ups are disabled, this requires additional wiring with pull-down resistors!
//#define DISABLE_LIMIT_PIN_PULL_UP
-//#define DISABLE_PROBE_PIN_PULL_UP
+#define DISABLE_PROBE_PIN_PULL_UP
//#define DISABLE_CONTROL_PIN_PULL_UP
// Sets which axis the tool length offset is applied. Assumes the spindle is always parallel with
diff --git a/Grbl_Esp32/machine.h b/Grbl_Esp32/machine.h
index 3f987a9..06e276f 100644
--- a/Grbl_Esp32/machine.h
+++ b/Grbl_Esp32/machine.h
@@ -17,7 +17,7 @@ PWM
// !!! For initial testing, start with test_drive.h which disables
// all I/O pins
// #include "Machines/atari_1020.h"
-#include "Machines/test_drive.h"
+#include "Machines/jesse_i2s.h"
// !!! For actual use, change the line above to select a board
// from Machines/, for example:
diff --git a/Grbl_Esp32/nuts_bolts.cpp b/Grbl_Esp32/nuts_bolts.cpp
index 72e8623..a044639 100644
--- a/Grbl_Esp32/nuts_bolts.cpp
+++ b/Grbl_Esp32/nuts_bolts.cpp
@@ -146,6 +146,7 @@ float limit_acceleration_by_axis_maximum(float* unit_vec) {
// but used in units of mm/min^2. It suffices to perform the conversion once on
// exit, since the limit computation above is independent of units - it simply
// finds the smallest value.
+ //return (limit_value);
return (limit_value * SEC_PER_MIN_SQ);
}
18LTS schoch@xeon:/mnt/c/Users/jesse/Documents/Arduino/i2s_grbl/Grbl_Esp32/Grbl_Esp32$ cat Machines/jesse_i2s.h
/*
i2s_out_xyzabc.h
Part of Grbl_ESP32
Pin assignments for the ESP32 I2S 6-axis board
2018 - Bart Dring
2020 - Mitch Bradley
2020 - Michiyasu Odaki
Grbl_ESP32 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl_ESP32. If not, see <http://www.gnu.org/licenses/>.
*/
#define MACHINE_NAME "ESP32 I2S 6 Axis Driver Board (StepStick)"
#ifdef N_AXIS
#undef N_AXIS
#endif
#define N_AXIS 6
#ifdef ENABLE_SD_CARD
#undef ENABLE_SD_CARD
#endif
// === Special Features
// I2S (steppers & other output-only pins)
#define USE_I2S_OUT
// Define USE_I2S_OUT_STREAM if buffering is used.
// (there will be a delay between the specified I/O operation and the actual I/O execution)
//#define USE_I2S_OUT_STREAM
#undef USE_RMT_STEPS
//#define USE_STEPSTICK // makes sure MS1,2,3 !reset and !sleep are set
#define I2S_OUT_BCK GPIO_NUM_22
#define I2S_OUT_WS GPIO_NUM_17
#define I2S_OUT_DATA GPIO_NUM_21
#define STEPPER_MS1 GPIO_NUM_23 // MOSI
#define STEPPER_MS2 GPIO_NUM_18 // SCK
#define STEPPER_X_MS3 I2SO(3) // X_CS
#define STEPPER_Y_MS3 I2SO(6) // Y_CS
#define STEPPER_Z_MS3 I2SO(11) // Z_CS
#define STEPPER_A_MS3 I2SO(14) // A_CS
#define STEPPER_B_MS3 I2SO(19) // B_CS
#define STEPPER_C_MS3 I2SO(22) // C_CS
#define STEPPER_RESET GPIO_NUM_19
#define X_DISABLE_PIN I2SO(0)
#define X_DIRECTION_PIN I2SO(1)
#define X_STEP_PIN I2SO(2)
#define Y_DIRECTION_PIN I2SO(4)
#define Y_STEP_PIN I2SO(5)
#define Y_DISABLE_PIN I2SO(7)
#define Z_DISABLE_PIN I2SO(8)
#define Z_DIRECTION_PIN I2SO(9)
#define Z_STEP_PIN I2SO(10)
#define A_DIRECTION_PIN I2SO(12)
#define A_STEP_PIN I2SO(13)
#define A_DISABLE_PIN I2SO(15)
#define B_DISABLE_PIN I2SO(16)
#define B_DIRECTION_PIN I2SO(17)
#define B_STEP_PIN I2SO(18)
//#define B_CS_PIN I2SO(19)
#define C_DIRECTION_PIN I2SO(20)
#define C_STEP_PIN I2SO(21)
//#define C_CS_PIN I2SO(22)
#define C_DISABLE_PIN I2SO(23)
#define SPINDLE_TYPE SPINDLE_TYPE_PWM // only one spindle at a time
#define SPINDLE_OUTPUT_PIN GPIO_NUM_26
#define SPINDLE_ENABLE_PIN GPIO_NUM_4
#define SPINDLE_DIR_PIN GPIO_NUM_16
#define X_LIMIT_PIN GPIO_NUM_36
#define Y_LIMIT_PIN GPIO_NUM_39
#define Z_LIMIT_PIN GPIO_NUM_34
#define A_LIMIT_PIN GPIO_NUM_35
#define B_LIMIT_PIN GPIO_NUM_32
#define C_LIMIT_PIN GPIO_NUM_33
#define PROBE_PIN GPIO_NUM_25
#define COOLANT_MIST_PIN GPIO_NUM_2
// === Default settings
#define DEFAULT_STEP_PULSE_MICROSECONDS I2S_OUT_USEC_PER_PULSE
$Radio/Mode=BT
$Bluetooth/Name=btgrblesp
$Report/StallGuard=
$Spindle/Type=PWM
$Stepper/Pulse=5
$Stepper/IdleTime=255
$Stepper/StepInvert=
$Stepper/DirInvert=
$Stepper/EnableInvert=On
$Limits/Invert=On
$Probe/Invert=On
$Report/Status=1
$GCode/JunctionDeviation=0.010
$GCode/ArcTolerance=0.002
$Report/Inches=Off
$Limits/Soft=Off
$Limits/Hard=Off
$Homing/Enable=Off
$Homing/DirInvert=XY
$Homing/Feed=200.000
$Homing/Seek=2000.000
$Homing/Debounce=250.000
$Homing/Pulloff=4.000
$GCode/MaxS=1000.000
$GCode/MinS=0.000
$GCode/LaserMode=Off
$GCode/Line1=
$GCode/Line0=
$Spindle/Delay/SpinDown=0.000
$Spindle/Delay/SpinUp=0.000
$Spindle/PWM/Frequency=5000.000
$Spindle/PWM/Off=0.000
$Spindle/PWM/Min=0.000
$Spindle/PWM/Max=100.000
$X/StepsPerMm=1600.000
$Y/StepsPerMm=5120.000
$Z/StepsPerMm=100.000
$A/StepsPerMm=100.000
$B/StepsPerMm=100.000
$C/StepsPerMm=100.000
$X/MaxRate=1500.000
$Y/MaxRate=200.000
$Z/MaxRate=1000.000
$A/MaxRate=1000.000
$B/MaxRate=1000.000
$C/MaxRate=1000.000
$X/Acceleration=5.000
$Y/Acceleration=30.000
$Z/Acceleration=200.000
$A/Acceleration=200.000
$B/Acceleration=200.000
$C/Acceleration=200.000
$X/MaxTravel=600.000
$Y/MaxTravel=300.000
$Z/MaxTravel=300.000
$A/MaxTravel=300.000
$B/MaxTravel=300.000
$C/MaxTravel=300.000
$X/Current/Run=0.250
$Y/Current/Run=0.250
$Z/Current/Run=0.250
$A/Current/Run=0.250
$B/Current/Run=0.250
$C/Current/Run=0.250
$X/Current/Hold=0.125
$Y/Current/Hold=0.125
$Z/Current/Hold=0.125
$A/Current/Hold=0.125
$B/Current/Hold=0.125
$C/Current/Hold=0.125
$X/Microsteps=16
$Y/Microsteps=16
$Z/Microsteps=16<Idle|MPos:0.000,27.520,0.000,0.000,0.000,0.000|FS:0,0|Pn:PXYZA>
$A/Microsteps=16
$B/Microsteps=16
$C/Microsteps=16
$X/StallGuard=16
$Y/StallGuard=16
$Z/StallGuard=16
$A/StallGuard=16
$B/StallGuard=16
$C/StallGuard=16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment