From 894176afb4c48d7f3779e5d6c9fbf46a87dc44b2 Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Thu, 15 Sep 2022 22:01:38 +0800
Subject: [PATCH 1/8] Add files via upload
---
Marlin/src/pins/esp32/pins_JOKER.h | 251 +++++++++++++++++++++++++++++
1 file changed, 251 insertions(+)
create mode 100644 Marlin/src/pins/esp32/pins_JOKER.h
diff --git a/Marlin/src/pins/esp32/pins_JOKER.h b/Marlin/src/pins/esp32/pins_JOKER.h
new file mode 100644
index 000000000000..d97aa73058bc
--- /dev/null
+++ b/Marlin/src/pins/esp32/pins_JOKER.h
@@ -0,0 +1,251 @@
+/**
+ * JIOKER
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * MRR ESPE pin assignments
+ *
+ * 3D printer control board based on the ESP32 microcontroller.
+ * Supports 5 stepper drivers (using I2S stepper stream), heated bed,
+ * single hotend, and LCD controller.
+ */
+
+#include "env_validate.h"
+
+//#if EXTRUDERS > 2 || E_STEPPERS > 2
+ //#error "MRR ESPE supports up to 2 E steppers."
+//#elif HAS_MULTI_HOTEND
+ //#error "MRR ESPE only supports 1 hotend / E stepper."
+//#endif
+
+#define BOARD_INFO_NAME "MRR ESPE"
+#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPE"
+#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
+
+//
+// Limit Switches
+//
+#define X_STOP_PIN 15
+#define Y_STOP_PIN 16
+#define Z_STOP_PIN 17
+
+//
+// Enable I2S stepper stream
+//
+#define I2S_STEPPER_STREAM
+#define I2S_WS 26
+#define I2S_BCK 25
+#define I2S_DATA 27
+#if ENABLED(LIN_ADVANCE)
+ #error "I2S stream is currently incompatible with LIN_ADVANCE."
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN 128
+#define X_DIR_PIN 129
+#define X_ENABLE_PIN 136
+//#define X_CS_PIN -1
+
+#define Y_STEP_PIN 130
+#define Y_DIR_PIN 131
+#define Y_ENABLE_PIN X_ENABLE_PIN
+//#define Y_CS_PIN -1
+
+#define Z_STEP_PIN 132
+#define Z_DIR_PIN 133
+#define Z_ENABLE_PIN 137
+//#define Z_CS_PIN -1 // SS_PIN
+
+#define E0_STEP_PIN 134
+#define E0_DIR_PIN 135
+#define E0_ENABLE_PIN 138
+//#define E0_CS_PIN -1
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN 36 // Analog Input
+#define TEMP_BED_PIN 39 // Analog Input
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN 141
+#define FAN_PIN 143
+#define HEATER_BED_PIN 140
+
+//#define CONTROLLER_FAN_PIN -1
+#define E0_AUTO_FAN_PIN 142 // need to update Configuration_adv.h @section extruder
+
+//
+// MicroSD card
+//
+#define SD_MOSI_PIN 23
+#define SD_MISO_PIN 19
+#define SD_SCK_PIN 18
+#define SDSS 5
+#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
+
+//////////////////////////
+// LCDs and Controllers //
+//////////////////////////
+
+#if HAS_WIRED_LCD
+
+ //#define LCD_PINS_RS 13
+ //#define LCD_PINS_ENABLE 17
+ //#define LCD_PINS_D4 16
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define BEEPER_PIN 151
+
+ #elif IS_RRD_FG_SC
+
+ #define BEEPER_PIN 151
+
+ //#define LCD_PINS_D5 -1
+ //#define LCD_PINS_D6 -1
+ //#define LCD_PINS_D7 -1
+
+ #else
+
+ //#error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue."
+
+ #endif
+
+ #define BTN_EN1 2
+ #define BTN_EN2 4
+ #define BTN_ENC 12
+ #define BEEPER_PIN 139
+#endif // HAS_MARLINUI_U8GLIB
+
+// Hardware serial pins
+// Add the following to Configuration.h or Configuration_adv.h to assign
+// specific pins to hardware Serial1 and Serial2.
+// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
+// MRR ESPA does not have enough spare pins for such reassignment.
+//#define HARDWARE_SERIAL1_RX 21
+//#define HARDWARE_SERIAL1_TX 22
+//#define HARDWARE_SERIAL2_RX 2
+//#define HARDWARE_SERIAL2_TX 4
+
+//
+// Filament Runout Sensor -1关闭同时注释Configuration.h 1288
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN 13
+#endif
+//
+// Servos 3Douch探针
+//
+#define SERVO0_PIN 14
+//探针独立,不用于Z限位
+//Configuration.h里929行取消注释//#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
+
+//
+//拓展板
+//
+//+2只有2个MAX限位,+5的限位和热敏只能6选3,开启需注释掉46行Limit Switches
+#ifndef X_STOP_PIN
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN 15
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN -1//32
+ #endif
+#endif
+#ifndef Y_STOP_PIN
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN 16
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN -1//33
+ #endif
+#endif
+#ifndef Z_STOP_PIN
+ #ifndef Z_MIN_PIN
+ #define Z_MIN_PIN 17
+ #endif
+ #ifndef Z_MAX_PIN
+ #define Z_MAX_PIN -1//34
+ #endif
+#endif
+
+//Steppers
+//
+//JOKER+2
+//
+//#define E1_STEP_PIN 144
+//#define E1_DIR_PIN 145
+//#define E1_ENABLE_PIN 146
+
+//#define Z2_STEP_PIN 147
+//#define Z2_DIR_PIN 148
+//#define Z2_ENABLE_PIN 149
+
+//#define TEMP_1_PIN 34 // Analog Input
+//#define HEATER_1_PIN 150
+//#define FAN1_PIN 151
+
+//
+//JOKER+5
+//
+//#define E1_STEP_PIN 144
+//#define E1_DIR_PIN 145
+//#define E1_ENABLE_PIN 146
+
+//#define Z2_STEP_PIN 147
+//#define Z2_DIR_PIN 148
+//#define Z2_ENABLE_PIN 149
+
+//#define Z3_STEP_PIN 150
+//#define Z3_DIR_PIN 151
+//#define Z3_ENABLE_PIN 152
+
+//#define E2_STEP_PIN 153
+//#define E2_DIR_PIN 154
+//#define E2_ENABLE_PIN 155
+
+//#define E3_STEP_PIN 156
+//#define E3_DIR_PIN 157
+//#define E3_ENABLE_PIN 158
+
+//和限位6选3
+//#define TEMP_1_PIN 32 // Analog Input
+//#define TEMP_2_PIN 33 // Analog Input
+//#define TEMP_3_PIN 34 // Analog Input
+
+//#define HEATER_1_PIN 159
+//#define HEATER_2_PIN 160
+//#define HEATER_3_PIN 161
+
+//#define FAN1_PIN 162
+//#define FAN1_PIN 163
+//#define FAN1_PIN 164
+
+//#define E1_AUTO_FAN_PIN 165
+//#define E1_AUTO_FAN_PIN 166
+//#define E1_AUTO_FAN_PIN 167
\ No newline at end of file
From bae683bc81fe9b31de88af93d57e5ca72ee71eb6 Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Mon, 29 May 2023 10:52:16 +0800
Subject: [PATCH 2/8] Update pins_JOKER.h
---
Marlin/src/pins/esp32/pins_JOKER.h | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Marlin/src/pins/esp32/pins_JOKER.h b/Marlin/src/pins/esp32/pins_JOKER.h
index d97aa73058bc..2cb5a3178c40 100644
--- a/Marlin/src/pins/esp32/pins_JOKER.h
+++ b/Marlin/src/pins/esp32/pins_JOKER.h
@@ -165,6 +165,13 @@
//探针独立,不用于Z限位
//Configuration.h里929行取消注释//#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
+//
+// M3/M4/M5 - Spindle/Laser Control激光
+//
+#define SPINDLE_LASER_ENA_PIN -1// FET 1
+#define SPINDLE_LASER_PWM_PIN 33// Bed FET
+//#define SPINDLE_DIR_PIN -1// FET 3
+
//
//拓展板
//
@@ -248,4 +255,4 @@
//#define E1_AUTO_FAN_PIN 165
//#define E1_AUTO_FAN_PIN 166
-//#define E1_AUTO_FAN_PIN 167
\ No newline at end of file
+//#define E1_AUTO_FAN_PIN 167
From 7d747f2a1dfec37756a8a938d73034e4296a14ef Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Mon, 29 May 2023 11:27:04 +0800
Subject: [PATCH 3/8] Update boards.h
---
Marlin/src/core/boards.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index 742cf8f236fc..fd7f52d077b1 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -483,6 +483,7 @@
#define BOARD_MKS_TINYBEE 7008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
#define BOARD_ENWI_ESPNP 7009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
#define BOARD_GODI_CONTROLLER_V1_0 7010 // Godi Controller based on ESP32 32-Bit V1.0
+#define BOARD_JOKER 7011 // JOKER based on ESP32 (with I2S stepper stream)
//
// SAMD51 ARM Cortex-M4
From 5f940f31794404accb97d8def2e66e1511016bdf Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Mon, 29 May 2023 11:42:32 +0800
Subject: [PATCH 4/8] Update boards.h
---
Marlin/src/core/boards.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index fd7f52d077b1..be54bc53d2df 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -483,7 +483,7 @@
#define BOARD_MKS_TINYBEE 7008 // MKS TinyBee based on ESP32 (with I2S stepper stream)
#define BOARD_ENWI_ESPNP 7009 // enwi ESPNP based on ESP32 (with I2S stepper stream)
#define BOARD_GODI_CONTROLLER_V1_0 7010 // Godi Controller based on ESP32 32-Bit V1.0
-#define BOARD_JOKER 7011 // JOKER based on ESP32 (with I2S stepper stream)
+#define BOARD_MM_JOKER 7011 // MagicMaker JOKER based on ESP32 (with I2S stepper stream)
//
// SAMD51 ARM Cortex-M4
From f84849759ad51726ff53f557552fe417c1fcd20b Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Mon, 29 May 2023 11:44:39 +0800
Subject: [PATCH 5/8] Delete pins_JOKER.h
---
Marlin/src/pins/esp32/pins_JOKER.h | 258 -----------------------------
1 file changed, 258 deletions(-)
delete mode 100644 Marlin/src/pins/esp32/pins_JOKER.h
diff --git a/Marlin/src/pins/esp32/pins_JOKER.h b/Marlin/src/pins/esp32/pins_JOKER.h
deleted file mode 100644
index 2cb5a3178c40..000000000000
--- a/Marlin/src/pins/esp32/pins_JOKER.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * JIOKER
- * Marlin 3D Printer Firmware
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
- *
- * Based on Sprinter and grbl.
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
- *
- * This program 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.
- *
- * This program 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 this program. If not, see .
- *
- */
-#pragma once
-
-/**
- * MRR ESPE pin assignments
- *
- * 3D printer control board based on the ESP32 microcontroller.
- * Supports 5 stepper drivers (using I2S stepper stream), heated bed,
- * single hotend, and LCD controller.
- */
-
-#include "env_validate.h"
-
-//#if EXTRUDERS > 2 || E_STEPPERS > 2
- //#error "MRR ESPE supports up to 2 E steppers."
-//#elif HAS_MULTI_HOTEND
- //#error "MRR ESPE only supports 1 hotend / E stepper."
-//#endif
-
-#define BOARD_INFO_NAME "MRR ESPE"
-#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPE"
-#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
-
-//
-// Limit Switches
-//
-#define X_STOP_PIN 15
-#define Y_STOP_PIN 16
-#define Z_STOP_PIN 17
-
-//
-// Enable I2S stepper stream
-//
-#define I2S_STEPPER_STREAM
-#define I2S_WS 26
-#define I2S_BCK 25
-#define I2S_DATA 27
-#if ENABLED(LIN_ADVANCE)
- #error "I2S stream is currently incompatible with LIN_ADVANCE."
-#endif
-
-//
-// Steppers
-//
-#define X_STEP_PIN 128
-#define X_DIR_PIN 129
-#define X_ENABLE_PIN 136
-//#define X_CS_PIN -1
-
-#define Y_STEP_PIN 130
-#define Y_DIR_PIN 131
-#define Y_ENABLE_PIN X_ENABLE_PIN
-//#define Y_CS_PIN -1
-
-#define Z_STEP_PIN 132
-#define Z_DIR_PIN 133
-#define Z_ENABLE_PIN 137
-//#define Z_CS_PIN -1 // SS_PIN
-
-#define E0_STEP_PIN 134
-#define E0_DIR_PIN 135
-#define E0_ENABLE_PIN 138
-//#define E0_CS_PIN -1
-
-//
-// Temperature Sensors
-//
-#define TEMP_0_PIN 36 // Analog Input
-#define TEMP_BED_PIN 39 // Analog Input
-
-//
-// Heaters / Fans
-//
-#define HEATER_0_PIN 141
-#define FAN_PIN 143
-#define HEATER_BED_PIN 140
-
-//#define CONTROLLER_FAN_PIN -1
-#define E0_AUTO_FAN_PIN 142 // need to update Configuration_adv.h @section extruder
-
-//
-// MicroSD card
-//
-#define SD_MOSI_PIN 23
-#define SD_MISO_PIN 19
-#define SD_SCK_PIN 18
-#define SDSS 5
-#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
-
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
-
-#if HAS_WIRED_LCD
-
- //#define LCD_PINS_RS 13
- //#define LCD_PINS_ENABLE 17
- //#define LCD_PINS_D4 16
-
- #if ENABLED(CR10_STOCKDISPLAY)
-
- #define BEEPER_PIN 151
-
- #elif IS_RRD_FG_SC
-
- #define BEEPER_PIN 151
-
- //#define LCD_PINS_D5 -1
- //#define LCD_PINS_D6 -1
- //#define LCD_PINS_D7 -1
-
- #else
-
- //#error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue."
-
- #endif
-
- #define BTN_EN1 2
- #define BTN_EN2 4
- #define BTN_ENC 12
- #define BEEPER_PIN 139
-#endif // HAS_MARLINUI_U8GLIB
-
-// Hardware serial pins
-// Add the following to Configuration.h or Configuration_adv.h to assign
-// specific pins to hardware Serial1 and Serial2.
-// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
-// MRR ESPA does not have enough spare pins for such reassignment.
-//#define HARDWARE_SERIAL1_RX 21
-//#define HARDWARE_SERIAL1_TX 22
-//#define HARDWARE_SERIAL2_RX 2
-//#define HARDWARE_SERIAL2_TX 4
-
-//
-// Filament Runout Sensor -1关闭同时注释Configuration.h 1288
-//
-#ifndef FIL_RUNOUT_PIN
- #define FIL_RUNOUT_PIN 13
-#endif
-//
-// Servos 3Douch探针
-//
-#define SERVO0_PIN 14
-//探针独立,不用于Z限位
-//Configuration.h里929行取消注释//#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
-
-//
-// M3/M4/M5 - Spindle/Laser Control激光
-//
-#define SPINDLE_LASER_ENA_PIN -1// FET 1
-#define SPINDLE_LASER_PWM_PIN 33// Bed FET
-//#define SPINDLE_DIR_PIN -1// FET 3
-
-//
-//拓展板
-//
-//+2只有2个MAX限位,+5的限位和热敏只能6选3,开启需注释掉46行Limit Switches
-#ifndef X_STOP_PIN
- #ifndef X_MIN_PIN
- #define X_MIN_PIN 15
- #endif
- #ifndef X_MAX_PIN
- #define X_MAX_PIN -1//32
- #endif
-#endif
-#ifndef Y_STOP_PIN
- #ifndef Y_MIN_PIN
- #define Y_MIN_PIN 16
- #endif
- #ifndef Y_MAX_PIN
- #define Y_MAX_PIN -1//33
- #endif
-#endif
-#ifndef Z_STOP_PIN
- #ifndef Z_MIN_PIN
- #define Z_MIN_PIN 17
- #endif
- #ifndef Z_MAX_PIN
- #define Z_MAX_PIN -1//34
- #endif
-#endif
-
-//Steppers
-//
-//JOKER+2
-//
-//#define E1_STEP_PIN 144
-//#define E1_DIR_PIN 145
-//#define E1_ENABLE_PIN 146
-
-//#define Z2_STEP_PIN 147
-//#define Z2_DIR_PIN 148
-//#define Z2_ENABLE_PIN 149
-
-//#define TEMP_1_PIN 34 // Analog Input
-//#define HEATER_1_PIN 150
-//#define FAN1_PIN 151
-
-//
-//JOKER+5
-//
-//#define E1_STEP_PIN 144
-//#define E1_DIR_PIN 145
-//#define E1_ENABLE_PIN 146
-
-//#define Z2_STEP_PIN 147
-//#define Z2_DIR_PIN 148
-//#define Z2_ENABLE_PIN 149
-
-//#define Z3_STEP_PIN 150
-//#define Z3_DIR_PIN 151
-//#define Z3_ENABLE_PIN 152
-
-//#define E2_STEP_PIN 153
-//#define E2_DIR_PIN 154
-//#define E2_ENABLE_PIN 155
-
-//#define E3_STEP_PIN 156
-//#define E3_DIR_PIN 157
-//#define E3_ENABLE_PIN 158
-
-//和限位6选3
-//#define TEMP_1_PIN 32 // Analog Input
-//#define TEMP_2_PIN 33 // Analog Input
-//#define TEMP_3_PIN 34 // Analog Input
-
-//#define HEATER_1_PIN 159
-//#define HEATER_2_PIN 160
-//#define HEATER_3_PIN 161
-
-//#define FAN1_PIN 162
-//#define FAN1_PIN 163
-//#define FAN1_PIN 164
-
-//#define E1_AUTO_FAN_PIN 165
-//#define E1_AUTO_FAN_PIN 166
-//#define E1_AUTO_FAN_PIN 167
From ff91a8fb0a646d61f16c2f6ec7356f473221c537 Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Mon, 29 May 2023 11:48:47 +0800
Subject: [PATCH 6/8] Add files via upload
---
Marlin/src/pins/esp32/pins_MM_JOKER.h | 258 ++++++++++++++++++++++++++
1 file changed, 258 insertions(+)
create mode 100644 Marlin/src/pins/esp32/pins_MM_JOKER.h
diff --git a/Marlin/src/pins/esp32/pins_MM_JOKER.h b/Marlin/src/pins/esp32/pins_MM_JOKER.h
new file mode 100644
index 000000000000..b5d68007aaeb
--- /dev/null
+++ b/Marlin/src/pins/esp32/pins_MM_JOKER.h
@@ -0,0 +1,258 @@
+/**
+ * JIOKER
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program 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.
+ *
+ * This program 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 this program. If not, see .
+ *
+ */
+#pragma once
+
+/**
+ * MRR ESPE pin assignments
+ *
+ * 3D printer control board based on the ESP32 microcontroller.
+ * Supports 5 stepper drivers (using I2S stepper stream), heated bed,
+ * single hotend, and LCD controller.
+ */
+
+#include "env_validate.h"
+
+//#if EXTRUDERS > 2 || E_STEPPERS > 2
+ //#error "MRR ESPE supports up to 2 E steppers."
+//#elif HAS_MULTI_HOTEND
+ //#error "MRR ESPE only supports 1 hotend / E stepper."
+//#endif
+
+#define BOARD_INFO_NAME "MRR ESPE"
+#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPE"
+#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
+
+//
+// Limit Switches
+//
+#define X_STOP_PIN 15
+#define Y_STOP_PIN 16
+#define Z_STOP_PIN 17
+
+//
+// Enable I2S stepper stream
+//
+#define I2S_STEPPER_STREAM
+#define I2S_WS 26
+#define I2S_BCK 25
+#define I2S_DATA 27
+#if ENABLED(LIN_ADVANCE)
+ #error "I2S stream is currently incompatible with LIN_ADVANCE."
+#endif
+
+//
+// Steppers
+//
+#define X_STEP_PIN 128
+#define X_DIR_PIN 129
+#define X_ENABLE_PIN 136
+//#define X_CS_PIN -1
+
+#define Y_STEP_PIN 130
+#define Y_DIR_PIN 131
+#define Y_ENABLE_PIN X_ENABLE_PIN
+//#define Y_CS_PIN -1
+
+#define Z_STEP_PIN 132
+#define Z_DIR_PIN 133
+#define Z_ENABLE_PIN 137
+//#define Z_CS_PIN -1 // SS_PIN
+
+#define E0_STEP_PIN 134
+#define E0_DIR_PIN 135
+#define E0_ENABLE_PIN 138
+//#define E0_CS_PIN -1
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN 36 // Analog Input
+#define TEMP_BED_PIN 39 // Analog Input
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN 141
+#define FAN_PIN 143
+#define HEATER_BED_PIN 140
+
+//#define CONTROLLER_FAN_PIN -1
+#define E0_AUTO_FAN_PIN 142 // need to update Configuration_adv.h @section extruder
+
+//
+// MicroSD card
+//
+#define SD_MOSI_PIN 23
+#define SD_MISO_PIN 19
+#define SD_SCK_PIN 18
+#define SDSS 5
+#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
+
+//////////////////////////
+// LCDs and Controllers //
+//////////////////////////
+
+#if HAS_WIRED_LCD
+
+ //#define LCD_PINS_RS 13
+ //#define LCD_PINS_ENABLE 17
+ //#define LCD_PINS_D4 16
+
+ #if ENABLED(CR10_STOCKDISPLAY)
+
+ #define BEEPER_PIN 151
+
+ #elif IS_RRD_FG_SC
+
+ #define BEEPER_PIN 151
+
+ //#define LCD_PINS_D5 -1
+ //#define LCD_PINS_D6 -1
+ //#define LCD_PINS_D7 -1
+
+ #else
+
+ //#error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue."
+
+ #endif
+
+ #define BTN_EN1 2
+ #define BTN_EN2 4
+ #define BTN_ENC 12
+ #define BEEPER_PIN 139
+#endif // HAS_MARLINUI_U8GLIB
+
+// Hardware serial pins
+// Add the following to Configuration.h or Configuration_adv.h to assign
+// specific pins to hardware Serial1 and Serial2.
+// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
+// MRR ESPA does not have enough spare pins for such reassignment.
+//#define HARDWARE_SERIAL1_RX 21
+//#define HARDWARE_SERIAL1_TX 22
+//#define HARDWARE_SERIAL2_RX 2
+//#define HARDWARE_SERIAL2_TX 4
+
+//
+// Filament Runout Sensor -1关闭同时注释Configuration.h 1288
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN 13
+#endif
+//
+// Servos 3Douch探针
+//
+#define SERVO0_PIN 14
+//探针独立,不用于Z限位
+//Configuration.h里929行取消注释//#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
+
+//
+// M3/M4/M5 - Spindle/Laser Control激光
+//
+#define SPINDLE_LASER_ENA_PIN -1// FET 1
+#define SPINDLE_LASER_PWM_PIN 33// Bed FET
+//#define SPINDLE_DIR_PIN -1// FET 3
+
+//
+//拓展板
+//
+//+2只有2个MAX限位,+5的限位和热敏只能6选3,开启需注释掉46行Limit Switches
+#ifndef X_STOP_PIN
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN 15
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN -1//32
+ #endif
+#endif
+#ifndef Y_STOP_PIN
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN 16
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN -1//33
+ #endif
+#endif
+#ifndef Z_STOP_PIN
+ #ifndef Z_MIN_PIN
+ #define Z_MIN_PIN 17
+ #endif
+ #ifndef Z_MAX_PIN
+ #define Z_MAX_PIN -1//34
+ #endif
+#endif
+
+//Steppers
+//
+//JOKER+2
+//
+//#define E1_STEP_PIN 144
+//#define E1_DIR_PIN 145
+//#define E1_ENABLE_PIN 146
+
+//#define Z2_STEP_PIN 147
+//#define Z2_DIR_PIN 148
+//#define Z2_ENABLE_PIN 149
+
+//#define TEMP_1_PIN 34 // Analog Input
+//#define HEATER_1_PIN 150
+//#define FAN1_PIN 151
+
+//
+//JOKER+5
+//
+//#define E1_STEP_PIN 144
+//#define E1_DIR_PIN 145
+//#define E1_ENABLE_PIN 146
+
+//#define Z2_STEP_PIN 147
+//#define Z2_DIR_PIN 148
+//#define Z2_ENABLE_PIN 149
+
+//#define Z3_STEP_PIN 150
+//#define Z3_DIR_PIN 151
+//#define Z3_ENABLE_PIN 152
+
+//#define E2_STEP_PIN 153
+//#define E2_DIR_PIN 154
+//#define E2_ENABLE_PIN 155
+
+//#define E3_STEP_PIN 156
+//#define E3_DIR_PIN 157
+//#define E3_ENABLE_PIN 158
+
+//和限位6选3
+//#define TEMP_1_PIN 32 // Analog Input
+//#define TEMP_2_PIN 33 // Analog Input
+//#define TEMP_3_PIN 34 // Analog Input
+
+//#define HEATER_1_PIN 159
+//#define HEATER_2_PIN 160
+//#define HEATER_3_PIN 161
+
+//#define FAN1_PIN 162
+//#define FAN1_PIN 163
+//#define FAN1_PIN 164
+
+//#define E1_AUTO_FAN_PIN 165
+//#define E1_AUTO_FAN_PIN 166
+//#define E1_AUTO_FAN_PIN 167
\ No newline at end of file
From c1e1b8351487f615a7c168fdec905661d3003ee2 Mon Sep 17 00:00:00 2001
From: magicmaker3 <66371323+magicmaker3@users.noreply.github.com>
Date: Mon, 29 May 2023 11:50:12 +0800
Subject: [PATCH 7/8] Update pins.h
---
Marlin/src/pins/pins.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index 6ee6401badfc..2833dab531fb 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -846,6 +846,8 @@
#include "esp32/pins_ENWI_ESPNP.h" // ESP32 env:esp32
#elif MB(GODI_CONTROLLER_V1_0)
#include "esp32/pins_GODI_CONTROLLER_V1_0.h" // ESP32 env:godi_esp32
+#elif MB(MM_JOKER)
+ #include "esp32/pins_MM_JOKER.h" // ESP32 env:esp32
//
// Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4)
From 426ae16a0618883755a1e2fd7a5668ee58c5ea1b Mon Sep 17 00:00:00 2001
From: Scott Lahteine
Date: Mon, 29 May 2023 18:35:48 -0500
Subject: [PATCH 8/8] clean up, add expansion options
---
Marlin/src/inc/SanityCheck.h | 10 +-
Marlin/src/pins/esp32/pins_MM_JOKER.h | 318 +++++++++++++-------------
2 files changed, 169 insertions(+), 159 deletions(-)
diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h
index 78630051b67d..91956c2ce576 100644
--- a/Marlin/src/inc/SanityCheck.h
+++ b/Marlin/src/inc/SanityCheck.h
@@ -626,10 +626,12 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
*/
#if HAS_MULTI_EXTRUDER
- #if HAS_EXTENDABLE_MMU
- #define MAX_EXTRUDERS 15
- #else
- #define MAX_EXTRUDERS 8
+ #ifndef MAX_EXTRUDERS
+ #if HAS_EXTENDABLE_MMU
+ #define MAX_EXTRUDERS 15
+ #else
+ #define MAX_EXTRUDERS 8
+ #endif
#endif
static_assert(EXTRUDERS <= MAX_EXTRUDERS, "Marlin supports a maximum of " STRINGIFY(MAX_EXTRUDERS) " EXTRUDERS.");
#undef MAX_EXTRUDERS
diff --git a/Marlin/src/pins/esp32/pins_MM_JOKER.h b/Marlin/src/pins/esp32/pins_MM_JOKER.h
index b5d68007aaeb..184a94c01b30 100644
--- a/Marlin/src/pins/esp32/pins_MM_JOKER.h
+++ b/Marlin/src/pins/esp32/pins_MM_JOKER.h
@@ -1,7 +1,6 @@
/**
- * JIOKER
* Marlin 3D Printer Firmware
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
@@ -23,25 +22,48 @@
#pragma once
/**
- * MRR ESPE pin assignments
- *
- * 3D printer control board based on the ESP32 microcontroller.
- * Supports 5 stepper drivers (using I2S stepper stream), heated bed,
- * single hotend, and LCD controller.
+ * JOKER pin assignments
*/
#include "env_validate.h"
-//#if EXTRUDERS > 2 || E_STEPPERS > 2
- //#error "MRR ESPE supports up to 2 E steppers."
-//#elif HAS_MULTI_HOTEND
- //#error "MRR ESPE only supports 1 hotend / E stepper."
-//#endif
-
-#define BOARD_INFO_NAME "MRR ESPE"
-#define BOARD_WEBSITE_URL "github.com/maplerainresearch/MRR_ESPE"
+#define BOARD_INFO_NAME "JOKER"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
+//
+// Expansion Boards for more axes, sensors, heaters
+// Only enable one of these options.
+//
+//#define JOKER_PLUS_2
+//#define JOKER_PLUS_5
+
+#if ENABLED(JOKER_PLUS_2)
+ #define MAX_EXTRUDERS 2
+ #if E_STEPPERS > 2
+ #error "JOKER with +2 expansion supports up to 2 E steppers."
+ #elif HOTENDS > 2
+ #error "JOKER with +2 expansion supports up to 2 hotends."
+ #endif
+#elif ENABLED(JOKER_PLUS_5)
+ #define MAX_EXTRUDERS 3
+ #if E_STEPPERS > 3
+ #error "JOKER with +5 expansion supports up to 3 E steppers."
+ #elif HOTENDS > 3
+ #error "JOKER with +5 expansion supports up to 3 hotends."
+ #endif
+#else
+ #if E_STEPPERS > 1
+ #error "JOKER without expansion only supports 1 E stepper."
+ #elif HAS_MULTI_HOTEND
+ #error "JOKER without expansion only supports 1 hotend."
+ #endif
+#endif
+
+//
+// Servos
+//
+#define SERVO0_PIN 14
+
//
// Limit Switches
//
@@ -49,15 +71,28 @@
#define Y_STOP_PIN 16
#define Z_STOP_PIN 17
+//
+// Filament Runout Sensor
+//
+#ifndef FIL_RUNOUT_PIN
+ #define FIL_RUNOUT_PIN 13
+#endif
+
+#ifndef Z_MIN_PROBE_PIN
+ //#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
+#endif
+
//
// Enable I2S stepper stream
//
#define I2S_STEPPER_STREAM
-#define I2S_WS 26
-#define I2S_BCK 25
-#define I2S_DATA 27
-#if ENABLED(LIN_ADVANCE)
- #error "I2S stream is currently incompatible with LIN_ADVANCE."
+#if ENABLED(I2S_STEPPER_STREAM)
+ #define I2S_WS 26
+ #define I2S_BCK 25
+ #define I2S_DATA 27
+ #if ENABLED(LIN_ADVANCE)
+ #error "I2S stream is currently incompatible with LIN_ADVANCE."
+ #endif
#endif
//
@@ -66,22 +101,53 @@
#define X_STEP_PIN 128
#define X_DIR_PIN 129
#define X_ENABLE_PIN 136
-//#define X_CS_PIN -1
#define Y_STEP_PIN 130
#define Y_DIR_PIN 131
#define Y_ENABLE_PIN X_ENABLE_PIN
-//#define Y_CS_PIN -1
#define Z_STEP_PIN 132
#define Z_DIR_PIN 133
#define Z_ENABLE_PIN 137
-//#define Z_CS_PIN -1 // SS_PIN
#define E0_STEP_PIN 134
#define E0_DIR_PIN 135
#define E0_ENABLE_PIN 138
-//#define E0_CS_PIN -1
+
+#if ENABLED(JOKER_PLUS_2)
+
+ #define E1_STEP_PIN 144
+ #define E1_DIR_PIN 145
+ #define E1_ENABLE_PIN 146
+
+ #define E2_STEP_PIN 147
+ #define E2_DIR_PIN 148
+ #define E2_ENABLE_PIN 149
+
+#elif ENABLED(JOKER_PLUS_5)
+
+ #define E1_STEP_PIN 144
+ #define E1_DIR_PIN 145
+ #define E1_ENABLE_PIN 146
+
+ #define E2_STEP_PIN 153
+ #define E2_DIR_PIN 154
+ #define E2_ENABLE_PIN 155
+
+ #define E3_STEP_PIN 156
+ #define E3_DIR_PIN 157
+ #define E3_ENABLE_PIN 158
+
+ // Are these preferred for X2, Y2, Z2, Z3 ?
+ #define E4_STEP_PIN 147
+ #define E4_DIR_PIN 148
+ #define E4_ENABLE_PIN 149
+
+ #define E5_STEP_PIN 150
+ #define E5_DIR_PIN 151
+ #define E5_ENABLE_PIN 152
+
+#endif
//
// Temperature Sensors
@@ -89,18 +155,58 @@
#define TEMP_0_PIN 36 // Analog Input
#define TEMP_BED_PIN 39 // Analog Input
+#if ENABLED(JOKER_PLUS_2)
+ #define TEMP_1_PIN 34 // Analog Input
+#elif ENABLED(JOKER_PLUS_5)
+ #define TEMP_1_PIN 32 // Analog Input
+ #define TEMP_2_PIN 33 // Analog Input
+ #define TEMP_3_PIN 34 // Analog Input
+#endif
+
//
// Heaters / Fans
//
-#define HEATER_0_PIN 141
-#define FAN_PIN 143
-#define HEATER_BED_PIN 140
+#define HEATER_0_PIN 141
+#define HEATER_BED_PIN 140
+#define FAN0_PIN 143
+
+#ifndef E0_AUTO_FAN_PIN
+ #define E0_AUTO_FAN_PIN 142 // Enabled in Configuration_adv.h
+#endif
+
+#ifndef CONTROLLER_FAN_PIN
+ //#define CONTROLLER_FAN_PIN -1
+#endif
+
+#if ENABLED(JOKER_PLUS_2)
+
+ #define HEATER_1_PIN 150
+ #define FAN1_PIN 151
+
+#elif ENABLED(JOKER_PLUS_5)
+
+ #define HEATER_1_PIN 159
+ #define HEATER_2_PIN 160
+ #define HEATER_3_PIN 161
-//#define CONTROLLER_FAN_PIN -1
-#define E0_AUTO_FAN_PIN 142 // need to update Configuration_adv.h @section extruder
+ #define FAN1_PIN 162
+ #define FAN2_PIN 163
+ #define FAN3_PIN 164
+
+ #ifndef E1_AUTO_FAN_PIN
+ #define E1_AUTO_FAN_PIN 165
+ #endif
+ #ifndef E2_AUTO_FAN_PIN
+ #define E2_AUTO_FAN_PIN 166
+ #endif
+ #ifndef E3_AUTO_FAN_PIN
+ #define E3_AUTO_FAN_PIN 167
+ #endif
+
+#endif
//
-// MicroSD card
+// SD Card
//
#define SD_MOSI_PIN 23
#define SD_MISO_PIN 19
@@ -108,15 +214,14 @@
#define SDSS 5
#define USES_SHARED_SPI // SPI is shared by SD card with TMC SPI drivers
-//////////////////////////
-// LCDs and Controllers //
-//////////////////////////
-
+//
+// LCD / Controller
+//
#if HAS_WIRED_LCD
- //#define LCD_PINS_RS 13
- //#define LCD_PINS_ENABLE 17
- //#define LCD_PINS_D4 16
+ //#define LCD_PINS_RS 13
+ //#define LCD_PINS_ENABLE 17
+ //#define LCD_PINS_D4 16
#if ENABLED(CR10_STOCKDISPLAY)
@@ -126,133 +231,36 @@
#define BEEPER_PIN 151
- //#define LCD_PINS_D5 -1
- //#define LCD_PINS_D6 -1
- //#define LCD_PINS_D7 -1
-
- #else
-
- //#error "Only CR10_STOCKDISPLAY and REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER are currently supported. Comment out this line to continue."
+ //#define LCD_PINS_D5 -1
+ //#define LCD_PINS_D6 -1
+ //#define LCD_PINS_D7 -1
#endif
- #define BTN_EN1 2
- #define BTN_EN2 4
+ #define BTN_EN1 2
+ #define BTN_EN2 4
#define BTN_ENC 12
- #define BEEPER_PIN 139
-#endif // HAS_MARLINUI_U8GLIB
-
-// Hardware serial pins
-// Add the following to Configuration.h or Configuration_adv.h to assign
-// specific pins to hardware Serial1 and Serial2.
-// Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
-// MRR ESPA does not have enough spare pins for such reassignment.
+ #define BEEPER_PIN 139
+
+#endif // HAS_WIRED_LCD
+
+/**
+ * Hardware Serial
+ * Add the following to Configuration.h or Configuration_adv.h to assign
+ * specific pins to hardware Serial1 and Serial2.
+ * Note: Serial2 can be defined using HARDWARE_SERIAL2_RX and HARDWARE_SERIAL2_TX but
+ * JOKER does not have enough spare pins for such reassignment.
+ */
//#define HARDWARE_SERIAL1_RX 21
//#define HARDWARE_SERIAL1_TX 22
//#define HARDWARE_SERIAL2_RX 2
//#define HARDWARE_SERIAL2_TX 4
//
-// Filament Runout Sensor -1关闭同时注释Configuration.h 1288
+// M3/M4/M5 - Spindle/Laser Control
//
-#ifndef FIL_RUNOUT_PIN
- #define FIL_RUNOUT_PIN 13
+#if HAS_CUTTER
+ #define SPINDLE_LASER_ENA_PIN -1 // FET 1
+ #define SPINDLE_LASER_PWM_PIN 33 // Bed FET
+ //#define SPINDLE_DIR_PIN -1 // FET 3
#endif
-//
-// Servos 3Douch探针
-//
-#define SERVO0_PIN 14
-//探针独立,不用于Z限位
-//Configuration.h里929行取消注释//#define Z_MIN_PROBE_PIN 35 // Pin 35 is the RAMPS default
-
-//
-// M3/M4/M5 - Spindle/Laser Control激光
-//
-#define SPINDLE_LASER_ENA_PIN -1// FET 1
-#define SPINDLE_LASER_PWM_PIN 33// Bed FET
-//#define SPINDLE_DIR_PIN -1// FET 3
-
-//
-//拓展板
-//
-//+2只有2个MAX限位,+5的限位和热敏只能6选3,开启需注释掉46行Limit Switches
-#ifndef X_STOP_PIN
- #ifndef X_MIN_PIN
- #define X_MIN_PIN 15
- #endif
- #ifndef X_MAX_PIN
- #define X_MAX_PIN -1//32
- #endif
-#endif
-#ifndef Y_STOP_PIN
- #ifndef Y_MIN_PIN
- #define Y_MIN_PIN 16
- #endif
- #ifndef Y_MAX_PIN
- #define Y_MAX_PIN -1//33
- #endif
-#endif
-#ifndef Z_STOP_PIN
- #ifndef Z_MIN_PIN
- #define Z_MIN_PIN 17
- #endif
- #ifndef Z_MAX_PIN
- #define Z_MAX_PIN -1//34
- #endif
-#endif
-
-//Steppers
-//
-//JOKER+2
-//
-//#define E1_STEP_PIN 144
-//#define E1_DIR_PIN 145
-//#define E1_ENABLE_PIN 146
-
-//#define Z2_STEP_PIN 147
-//#define Z2_DIR_PIN 148
-//#define Z2_ENABLE_PIN 149
-
-//#define TEMP_1_PIN 34 // Analog Input
-//#define HEATER_1_PIN 150
-//#define FAN1_PIN 151
-
-//
-//JOKER+5
-//
-//#define E1_STEP_PIN 144
-//#define E1_DIR_PIN 145
-//#define E1_ENABLE_PIN 146
-
-//#define Z2_STEP_PIN 147
-//#define Z2_DIR_PIN 148
-//#define Z2_ENABLE_PIN 149
-
-//#define Z3_STEP_PIN 150
-//#define Z3_DIR_PIN 151
-//#define Z3_ENABLE_PIN 152
-
-//#define E2_STEP_PIN 153
-//#define E2_DIR_PIN 154
-//#define E2_ENABLE_PIN 155
-
-//#define E3_STEP_PIN 156
-//#define E3_DIR_PIN 157
-//#define E3_ENABLE_PIN 158
-
-//和限位6选3
-//#define TEMP_1_PIN 32 // Analog Input
-//#define TEMP_2_PIN 33 // Analog Input
-//#define TEMP_3_PIN 34 // Analog Input
-
-//#define HEATER_1_PIN 159
-//#define HEATER_2_PIN 160
-//#define HEATER_3_PIN 161
-
-//#define FAN1_PIN 162
-//#define FAN1_PIN 163
-//#define FAN1_PIN 164
-
-//#define E1_AUTO_FAN_PIN 165
-//#define E1_AUTO_FAN_PIN 166
-//#define E1_AUTO_FAN_PIN 167
\ No newline at end of file