This is where those came from:
Edit: I can only reply three times in a row :
OK. I have this sort of working. The homing is a little funny, but I think that may be a pins problem.
Here’s what I did (from main, which is commit: f3ca8b2):
--- a/Grbl_Esp32/src/Machines/tmc2130_pen.h
+++ b/Grbl_Esp32/src/Machines/tmc2130_pen.h
@@ -27,8 +27,10 @@
// Select a version to match your PCB
-//#define MACHINE_V1 // version 1 PCB
-#define MACHINE_V2 // version 2 PCB
+#define MACHINE_V1 // version 1 PCB
+//#define MACHINE_V2 // version 2 PCB
+
+#define CUSTOM_CODE_FILENAME "../Custom/CoreXY.cpp"
And
diff --git a/platformio.ini b/platformio.ini
index ddf3a85..863126a 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -34,7 +34,7 @@ lib_deps_builtin =
[common]
build_flags =
- ;-DMACHINE_FILENAME=test_drive.h ;Remove ";" from the beginning of this line and specify the machine file
+ -DMACHINE_FILENAME=tmc2130_pen.h ;Remove ";" from the beginning of this line and specify the machine file
-DCORE_DEBUG_LEVEL=0
I used the platformio command line and did a platformio run
to compile it. That looked good. So I shipped it with platformio run -t upload
with the esp32 connected to the computer.
I had to connect to it’s wifi and set my AP settings, then I set up homing with these commands:
$Homing/Cycle0=Y
$Homing/Cycle1=X
$Homing/Cycle2=
$Homing/Enable=On
I can check the limit switches, if they are triggered they show up in the status line:
<Idle|MPos:1.000,1.000,0.000|FS:0,0|Pn:X>
Pn:X means the X is triggered. You can invert them with $Limits/Invert=On
.
There are actually a lot of neat things you can set that regular grbl can’t (I dont think so anyway). Try sending any one of these to see a ton of useful settings:
$Homing
$Limits
$Stepper
$Settings/List