diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h
index dce1faa5b..fd61fc7c4 100644
--- a/Marlin/Configuration_adv.h
+++ b/Marlin/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
index 1af050e20..3dbcfa76a 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL.cpp
@@ -121,6 +121,15 @@ const uint8_t adc_pins[] = {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH_PIN,
#endif
+ #if HAS_JOY_ADC_X
+ JOY_X_PIN,
+ #endif
+ #if HAS_JOY_ADC_Y
+ JOY_Y_PIN,
+ #endif
+ #if HAS_JOY_ADC_Z
+ JOY_Z_PIN,
+ #endif
};
enum TEMP_PINS : char {
@@ -151,15 +160,20 @@ enum TEMP_PINS : char {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH,
#endif
+ #if HAS_JOY_ADC_X
+ JOY_X,
+ #endif
+ #if HAS_JOY_ADC_Y
+ JOY_Y,
+ #endif
+ #if HAS_JOY_ADC_Z
+ JOY_Z,
+ #endif
ADC_PIN_COUNT
};
uint16_t HAL_adc_results[ADC_PIN_COUNT];
-// ------------------------
-// Function prototypes
-// ------------------------
-
// ------------------------
// Private functions
// ------------------------
@@ -305,6 +319,15 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
#if HAS_TEMP_ADC_5
case TEMP_5_PIN: pin_index = TEMP_5; break;
#endif
+ #if HAS_JOY_ADC_X
+ case JOY_X_PIN: pin_index = JOY_X; break;
+ #endif
+ #if HAS_JOY_ADC_Y
+ case JOY_Y_PIN: pin_index = JOY_Y; break;
+ #endif
+ #if HAS_JOY_ADC_Z
+ case JOY_Z_PIN: pin_index = JOY_Z; break;
+ #endif
#if ENABLED(FILAMENT_WIDTH_SENSOR)
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
#endif
diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp
index 2311301fd..e288e4837 100644
--- a/Marlin/src/Marlin.cpp
+++ b/Marlin/src/Marlin.cpp
@@ -89,6 +89,10 @@
#include "feature/bltouch.h"
#endif
+#if ENABLED(POLL_JOG)
+ #include "feature/joystick.h"
+#endif
+
#if HAS_SERVOS
#include "module/servo.h"
#endif
@@ -739,6 +743,10 @@ void idle(
#if ENABLED(PRUSA_MMU2)
mmu2.mmu_loop();
#endif
+
+ #if ENABLED(POLL_JOG)
+ joystick.inject_jog_moves();
+ #endif
}
/**
diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h
index 463b9b6f5..a690e0fc3 100644
--- a/Marlin/src/core/serial.h
+++ b/Marlin/src/core/serial.h
@@ -156,6 +156,8 @@ extern uint8_t marlin_debug_flags;
#define SERIAL_ECHO_SP(C) serial_spaces(C)
+#define SERIAL_ECHO_TERNARY(TF, PRE, ON, OFF, POST) serial_ternary(TF, PSTR(PRE), PSTR(ON), PSTR(OFF), PSTR(POST))
+
//
// Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
//
diff --git a/Marlin/src/feature/I2CPositionEncoder.cpp b/Marlin/src/feature/I2CPositionEncoder.cpp
index 7d225b8e0..6f3952fd9 100644
--- a/Marlin/src/feature/I2CPositionEncoder.cpp
+++ b/Marlin/src/feature/I2CPositionEncoder.cpp
@@ -233,7 +233,7 @@ bool I2CPositionEncoder::passes_test(const bool report) {
switch (H) {
case I2CPE_MAG_SIG_GOOD:
case I2CPE_MAG_SIG_MID:
- serial_ternary(H == I2CPE_MAG_SIG_GOOD, PSTR("passes test; field strength "), PSTR("good"), PSTR("fair"), PSTR(".\n"));
+ SERIAL_ECHO_TERNARY(H == I2CPE_MAG_SIG_GOOD, "passes test; field strength ", "good", "fair", ".\n");
break;
default:
SERIAL_ECHOLNPGM("not detected!");
diff --git a/Marlin/src/feature/I2CPositionEncoder.h b/Marlin/src/feature/I2CPositionEncoder.h
index 84e4a2951..072aa5e57 100644
--- a/Marlin/src/feature/I2CPositionEncoder.h
+++ b/Marlin/src/feature/I2CPositionEncoder.h
@@ -276,7 +276,7 @@ class I2CPositionEncodersMgr {
CHECK_IDX();
encoders[idx].set_ec_enabled(enabled);
SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]);
- serial_ternary(encoders[idx].get_ec_enabled(), PSTR(" axis is "), PSTR("en"), PSTR("dis"), PSTR("abled.\n"));
+ SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n");
}
static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {
diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp
index ee8fb48c9..5716f2955 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp
@@ -58,7 +58,7 @@
void unified_bed_leveling::report_state() {
echo_name();
- serial_ternary(planner.leveling_active, PSTR(" System v" UBL_VERSION " "), PSTR(""), PSTR("in"), PSTR("active\n"));
+ SERIAL_ECHO_TERNARY(planner.leveling_active, " System v" UBL_VERSION " ", "", "in", "active\n");
serial_delay(50);
}
diff --git a/Marlin/src/feature/joystick.cpp b/Marlin/src/feature/joystick.cpp
new file mode 100644
index 000000000..efadeeff3
--- /dev/null
+++ b/Marlin/src/feature/joystick.cpp
@@ -0,0 +1,151 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2019 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 .
+ *
+ */
+
+/**
+ * joystick.cpp - joystick input / jogging
+ */
+
+#include "../inc/MarlinConfigPre.h"
+
+#if ENABLED(JOYSTICK)
+
+#include "joystick.h"
+
+#include "../inc/MarlinConfig.h" // for pins
+#include "../module/planner.h"
+#include "../module/temperature.h"
+
+Joystick joystick;
+
+#if HAS_JOY_ADC_X
+ temp_info_t Joystick::x; // = { 0 }
+#endif
+#if HAS_JOY_ADC_Y
+ temp_info_t Joystick::y; // = { 0 }
+#endif
+#if HAS_JOY_ADC_Z
+ temp_info_t Joystick::z; // = { 0 }
+#endif
+
+#if ENABLED(JOYSTICK_DEBUG)
+ void Joystick::report() {
+ SERIAL_ECHOPGM("Joystick");
+ #if HAS_JOY_ADC_X
+ SERIAL_ECHOPAIR(" X", x.raw);
+ #endif
+ #if HAS_JOY_ADC_Y
+ SERIAL_ECHOPAIR(" Y", y.raw);
+ #endif
+ #if HAS_JOY_ADC_Z
+ SERIAL_ECHOPAIR(" Z", z.raw);
+ #endif
+ #if HAS_JOY_ADC_EN
+ SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");
+ #endif
+ SERIAL_EOL();
+ }
+#endif
+
+void Joystick::calculate(float norm_jog[XYZ]) {
+ // Do nothing if enable pin (active-low) is not LOW
+ #if HAS_JOY_ADC_EN
+ if (READ(JOY_EN_PIN)) return;
+ #endif
+
+ auto _normalize_joy = [](float &adc, const int16_t raw, const int16_t (&joy_limits)[4]) {
+ if (WITHIN(raw, joy_limits[0], joy_limits[3])) {
+ // within limits, check deadzone
+ if (raw > joy_limits[2])
+ adc = (raw - joy_limits[2]) / float(joy_limits[3] - joy_limits[2]);
+ else if (raw < joy_limits[1])
+ adc = (raw - joy_limits[1]) / float(joy_limits[1] - joy_limits[0]); // negative value
+ }
+ };
+
+ #if HAS_JOY_ADC_X
+ static constexpr int16_t joy_x_limits[4] = JOY_X_LIMITS;
+ _normalize_joy(norm_jog[X_AXIS], x.raw, joy_x_limits);
+ #endif
+ #if HAS_JOY_ADC_Y
+ static constexpr int16_t joy_y_limits[4] = JOY_Y_LIMITS;
+ _normalize_joy(norm_jog[Y_AXIS], y.raw, joy_y_limits);
+ #endif
+ #if HAS_JOY_ADC_Z
+ static constexpr int16_t joy_z_limits[4] = JOY_Z_LIMITS;
+ _normalize_joy(norm_jog[Z_AXIS], z.raw, joy_z_limits);
+ #endif
+}
+
+#if ENABLED(POLL_JOG)
+
+ void Joystick::inject_jog_moves() {
+ // Recursion barrier
+ static bool injecting_now; // = false;
+ if (injecting_now) return;
+
+ static constexpr int QUEUE_DEPTH = 5; // Insert up to this many movements
+ static constexpr float target_lag = 0.25f, // Aim for 1/4 second lag
+ seg_time = target_lag / QUEUE_DEPTH; // 0.05 seconds, short segments inserted every 1/20th of a second
+ static constexpr millis_t timer_limit_ms = millis_t(seg_time * 500); // 25 ms minimum delay between insertions
+
+ // The planner can merge/collapse small moves, so the movement queue is unreliable to control the lag
+ static millis_t next_run = 0;
+ if (PENDING(millis(), next_run)) return;
+ next_run = millis() + timer_limit_ms;
+
+ // Only inject a command if the planner has fewer than 5 moves and there are no unparsed commands
+ if (planner.movesplanned() >= QUEUE_DEPTH || queue.has_commands_queued())
+ return;
+
+ // Normalized jog values are 0 for no movement and -1 or +1 for as max feedrate (nonlinear relationship)
+ // Jog are initialized to zero and handling input can update values but doesn't have to
+ // You could use a two-axis joystick and a one-axis keypad and they might work together
+ float norm_jog[XYZ] = { 0 };
+
+ // Use ADC values and defined limits. The active zone is normalized: -1..0 (dead) 0..1
+ joystick.calculate(norm_jog);
+
+ // Other non-joystick poll-based jogging could be implemented here
+ // with "jogging" encapsulated as a more general class.
+
+ // Jogging value maps continuously (quadratic relationship) to feedrate
+ float move_dist[XYZ] = { 0 }, hypot2 = 0;
+ LOOP_XYZ(i) if (norm_jog[i]) {
+ move_dist[i] = seg_time * sq(norm_jog[i]) * planner.settings.max_feedrate_mm_s[i];
+ // Very small movements disappear when printed as decimal with 4 digits of precision
+ NOLESS(move_dist[i], 0.0002f);
+ if (norm_jog[i] < 0) move_dist[i] *= -1; // preserve sign
+ hypot2 += sq(move_dist[i]);
+ }
+
+ if (!UNEAR_ZERO(hypot2)) {
+ LOOP_XYZ(i) current_position[i] += move_dist[i];
+ const float length = sqrt(hypot2);
+ injecting_now = true;
+ planner.buffer_line(current_position, length / seg_time, active_extruder, length);
+ injecting_now = false;
+ }
+ }
+
+#endif // POLL_JOG
+
+#endif // JOYSTICK
diff --git a/Marlin/src/feature/joystick.h b/Marlin/src/feature/joystick.h
new file mode 100644
index 000000000..57dd5deeb
--- /dev/null
+++ b/Marlin/src/feature/joystick.h
@@ -0,0 +1,53 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2019 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
+
+/**
+ * joystick.h - joystick input / jogging
+ */
+
+#include "../core/macros.h"
+#include "../module/temperature.h"
+
+//#define JOYSTICK_DEBUG
+
+class Joystick {
+ friend class Temperature;
+ private:
+ #if HAS_JOY_ADC_X
+ static temp_info_t x;
+ #endif
+ #if HAS_JOY_ADC_Y
+ static temp_info_t y;
+ #endif
+ #if HAS_JOY_ADC_Z
+ static temp_info_t z;
+ #endif
+ public:
+ #if ENABLED(JOYSTICK_DEBUG)
+ static void report();
+ #endif
+ static void calculate(float norm_jog[XYZ]);
+ static void inject_jog_moves();
+};
+
+extern Joystick joystick;
diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h
index 8798ed486..1917faa74 100644
--- a/Marlin/src/gcode/parser.h
+++ b/Marlin/src/gcode/parser.h
@@ -263,13 +263,9 @@ public:
static inline void set_input_linear_units(const LinearUnit units) {
switch (units) {
- case LINEARUNIT_INCH:
- linear_unit_factor = 25.4f;
- break;
- case LINEARUNIT_MM:
default:
- linear_unit_factor = 1;
- break;
+ case LINEARUNIT_MM: linear_unit_factor = 1.0f; break;
+ case LINEARUNIT_INCH: linear_unit_factor = 25.4f; break;
}
volumetric_unit_factor = POW(linear_unit_factor, 3);
}
diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h
index a77117d50..37ec8c09a 100644
--- a/Marlin/src/inc/Conditionals_adv.h
+++ b/Marlin/src/inc/Conditionals_adv.h
@@ -105,3 +105,8 @@
// TMC SPI Chaining
#define TMC_USE_CHAIN (X_CHAIN_POS||Y_CHAIN_POS||Z_CHAIN_POS||X2_CHAIN_POS||Y2_CHAIN_POS||Z2_CHAIN_POS||Z3_CHAIN_POS||E0_CHAIN_POS||E1_CHAIN_POS||E2_CHAIN_POS||E3_CHAIN_POS||E4_CHAIN_POS||E5_CHAIN_POS)
+
+// Poll-based jogging for joystick and other devices
+#if ENABLED(JOYSTICK)
+ #define POLL_JOG
+#endif
diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h
index 4aa411e28..4e8f0ea4f 100644
--- a/Marlin/src/inc/Conditionals_post.h
+++ b/Marlin/src/inc/Conditionals_post.h
@@ -1026,6 +1026,13 @@
#define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER
#define HAS_HEATED_CHAMBER (HAS_TEMP_CHAMBER && PIN_EXISTS(HEATER_CHAMBER))
+#if ENABLED(JOYSTICK)
+ #define HAS_JOY_ADC_X PIN_EXISTS(JOY_X)
+ #define HAS_JOY_ADC_Y PIN_EXISTS(JOY_Y)
+ #define HAS_JOY_ADC_Z PIN_EXISTS(JOY_Z)
+ #define HAS_JOY_ADC_EN PIN_EXISTS(JOY_EN)
+#endif
+
// Heaters
#define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
#define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))
diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp
index b1a4f9e57..04f1ab6b1 100644
--- a/Marlin/src/module/endstops.cpp
+++ b/Marlin/src/module/endstops.cpp
@@ -44,6 +44,10 @@
#include "../feature/bltouch.h"
#endif
+#if ENABLED(JOYSTICK)
+ #include "../feature/joystick.h"
+#endif
+
Endstops endstops;
// private:
@@ -474,6 +478,11 @@ void _O2 Endstops::M119() {
#if ENABLED(BLTOUCH)
bltouch._reset_SW_mode();
#endif
+
+ #if ENABLED(JOYSTICK_DEBUG)
+ joystick.report();
+ #endif
+
} // Endstops::M119
// The following routines are called from an ISR context. It could be the temperature ISR, the
diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp
index fb762ed59..db584f17a 100644
--- a/Marlin/src/module/temperature.cpp
+++ b/Marlin/src/module/temperature.cpp
@@ -64,6 +64,10 @@
#include "../feature/leds/printer_event_leds.h"
#endif
+#if ENABLED(JOYSTICK)
+ #include "../feature/joystick.h"
+#endif
+
#if ENABLED(SINGLENOZZLE)
#include "tool_change.h"
#endif
@@ -1685,6 +1689,18 @@ void Temperature::init() {
#if HAS_TEMP_ADC_5
HAL_ANALOG_SELECT(TEMP_5_PIN);
#endif
+ #if HAS_JOY_ADC_X
+ HAL_ANALOG_SELECT(JOY_X_PIN);
+ #endif
+ #if HAS_JOY_ADC_Y
+ HAL_ANALOG_SELECT(JOY_Y_PIN);
+ #endif
+ #if HAS_JOY_ADC_Z
+ HAL_ANALOG_SELECT(JOY_Z_PIN);
+ #endif
+ #if HAS_JOY_ADC_EN
+ SET_INPUT_PULLUP(JOY_EN_PIN);
+ #endif
#if HAS_HEATED_BED
HAL_ANALOG_SELECT(TEMP_BED_PIN);
#endif
@@ -2195,6 +2211,16 @@ void Temperature::set_current_temp_raw() {
temp_chamber.update();
#endif
+ #if HAS_JOY_ADC_X
+ joystick.x.update();
+ #endif
+ #if HAS_JOY_ADC_Y
+ joystick.y.update();
+ #endif
+ #if HAS_JOY_ADC_Z
+ joystick.z.update();
+ #endif
+
temp_meas_ready = true;
}
@@ -2225,6 +2251,16 @@ void Temperature::readings_ready() {
temp_chamber.reset();
#endif
+ #if HAS_JOY_ADC_X
+ joystick.x.reset();
+ #endif
+ #if HAS_JOY_ADC_Y
+ joystick.y.reset();
+ #endif
+ #if HAS_JOY_ADC_Z
+ joystick.z.reset();
+ #endif
+
static constexpr int8_t temp_dir[] = {
#if ENABLED(HEATER_0_USES_MAX6675)
0
@@ -2721,6 +2757,21 @@ void Temperature::isr() {
break;
#endif
+ #if HAS_JOY_ADC_X
+ case PrepareJoy_X: HAL_START_ADC(JOY_X_PIN); break;
+ case MeasureJoy_X: ACCUMULATE_ADC(joystick.x); break;
+ #endif
+
+ #if HAS_JOY_ADC_Y
+ case PrepareJoy_Y: HAL_START_ADC(JOY_Y_PIN); break;
+ case MeasureJoy_Y: ACCUMULATE_ADC(joystick.y); break;
+ #endif
+
+ #if HAS_JOY_ADC_Z
+ case PrepareJoy_Z: HAL_START_ADC(JOY_Z_PIN); break;
+ case MeasureJoy_Z: ACCUMULATE_ADC(joystick.z); break;
+ #endif
+
#if HAS_ADC_BUTTONS
case Prepare_ADC_KEY: HAL_START_ADC(ADC_KEYPAD_PIN); break;
case Measure_ADC_KEY:
diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h
index b4db416f1..662d1866d 100644
--- a/Marlin/src/module/temperature.h
+++ b/Marlin/src/module/temperature.h
@@ -92,44 +92,43 @@ typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
enum ADCSensorState : char {
StartSampling,
#if HAS_TEMP_ADC_0
- PrepareTemp_0,
- MeasureTemp_0,
+ PrepareTemp_0, MeasureTemp_0,
#endif
#if HAS_HEATED_BED
- PrepareTemp_BED,
- MeasureTemp_BED,
+ PrepareTemp_BED, MeasureTemp_BED,
#endif
#if HAS_TEMP_CHAMBER
- PrepareTemp_CHAMBER,
- MeasureTemp_CHAMBER,
+ PrepareTemp_CHAMBER, MeasureTemp_CHAMBER,
#endif
#if HAS_TEMP_ADC_1
- PrepareTemp_1,
- MeasureTemp_1,
+ PrepareTemp_1, MeasureTemp_1,
#endif
#if HAS_TEMP_ADC_2
- PrepareTemp_2,
- MeasureTemp_2,
+ PrepareTemp_2, MeasureTemp_2,
#endif
#if HAS_TEMP_ADC_3
- PrepareTemp_3,
- MeasureTemp_3,
+ PrepareTemp_3, MeasureTemp_3,
#endif
#if HAS_TEMP_ADC_4
- PrepareTemp_4,
- MeasureTemp_4,
+ PrepareTemp_4, MeasureTemp_4,
#endif
#if HAS_TEMP_ADC_5
- PrepareTemp_5,
- MeasureTemp_5,
+ PrepareTemp_5, MeasureTemp_5,
+ #endif
+ #if HAS_JOY_ADC_X
+ PrepareJoy_X, MeasureJoy_X,
+ #endif
+ #if HAS_JOY_ADC_Y
+ PrepareJoy_Y, MeasureJoy_Y,
+ #endif
+ #if HAS_JOY_ADC_Z
+ PrepareJoy_Z, MeasureJoy_Z,
#endif
#if ENABLED(FILAMENT_WIDTH_SENSOR)
- Prepare_FILWIDTH,
- Measure_FILWIDTH,
+ Prepare_FILWIDTH, Measure_FILWIDTH,
#endif
#if HAS_ADC_BUTTONS
- Prepare_ADC_KEY,
- Measure_ADC_KEY,
+ Prepare_ADC_KEY, Measure_ADC_KEY,
#endif
SensorsReady, // Temperatures ready. Delay the next round of readings to let ADC pins settle.
StartupDelay // Startup, delay initial temp reading a tiny bit so the hardware can settle
diff --git a/buildroot/share/tests/megaatmega2560-tests b/buildroot/share/tests/megaatmega2560-tests
index 9f65ba9fd..c949c24bb 100755
--- a/buildroot/share/tests/megaatmega2560-tests
+++ b/buildroot/share/tests/megaatmega2560-tests
@@ -79,7 +79,7 @@ restore_configs
opt_enable ZONESTAR_LCD Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE \
AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
opt_set NUM_SERVOS 1
-opt_enable NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
+opt_enable NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK
exec_test $1 $2 "RAMPS with ZONESTAR_LCD, Servo Probe, 3-Point ABL, DEBUG_LEVELING_FEATURE, EEPROM, G38, and more"
#
diff --git a/config/default/Configuration_adv.h b/config/default/Configuration_adv.h
index dce1faa5b..fd61fc7c4 100644
--- a/config/default/Configuration_adv.h
+++ b/config/default/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
index 3d9893648..01dd28c0b 100644
--- a/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
+++ b/config/examples/3DFabXYZ/Migbot/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/ADIMLab/Gantry v1/Configuration_adv.h b/config/examples/ADIMLab/Gantry v1/Configuration_adv.h
index 32a4c0d83..f9a2a2f7a 100644
--- a/config/examples/ADIMLab/Gantry v1/Configuration_adv.h
+++ b/config/examples/ADIMLab/Gantry v1/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/ADIMLab/Gantry v2/Configuration_adv.h b/config/examples/ADIMLab/Gantry v2/Configuration_adv.h
index e61da380d..e2642e141 100644
--- a/config/examples/ADIMLab/Gantry v2/Configuration_adv.h
+++ b/config/examples/ADIMLab/Gantry v2/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/config/examples/AlephObjects/TAZ4/Configuration_adv.h
index 65ccc64cb..fa590fec3 100644
--- a/config/examples/AlephObjects/TAZ4/Configuration_adv.h
+++ b/config/examples/AlephObjects/TAZ4/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Alfawise/U20-bltouch/Configuration_adv.h b/config/examples/Alfawise/U20-bltouch/Configuration_adv.h
index 1d2a2e52c..667c93a19 100644
--- a/config/examples/Alfawise/U20-bltouch/Configuration_adv.h
+++ b/config/examples/Alfawise/U20-bltouch/Configuration_adv.h
@@ -2467,10 +2467,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Alfawise/U20/Configuration_adv.h b/config/examples/Alfawise/U20/Configuration_adv.h
index 93c77392c..dff74f254 100644
--- a/config/examples/Alfawise/U20/Configuration_adv.h
+++ b/config/examples/Alfawise/U20/Configuration_adv.h
@@ -2466,10 +2466,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2550,6 +2546,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/AliExpress/UM2pExt/Configuration_adv.h b/config/examples/AliExpress/UM2pExt/Configuration_adv.h
index 03de52bff..f8832bf51 100644
--- a/config/examples/AliExpress/UM2pExt/Configuration_adv.h
+++ b/config/examples/AliExpress/UM2pExt/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Anet/A2/Configuration_adv.h b/config/examples/Anet/A2/Configuration_adv.h
index 1862fc31b..3ef8bdf46 100644
--- a/config/examples/Anet/A2/Configuration_adv.h
+++ b/config/examples/Anet/A2/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Anet/A2plus/Configuration_adv.h b/config/examples/Anet/A2plus/Configuration_adv.h
index 1862fc31b..3ef8bdf46 100644
--- a/config/examples/Anet/A2plus/Configuration_adv.h
+++ b/config/examples/Anet/A2plus/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Anet/A6/Configuration_adv.h b/config/examples/Anet/A6/Configuration_adv.h
index aa68b8a62..4c653ecb8 100644
--- a/config/examples/Anet/A6/Configuration_adv.h
+++ b/config/examples/Anet/A6/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Anet/A8/Configuration_adv.h b/config/examples/Anet/A8/Configuration_adv.h
index d900bc9a5..b76295459 100644
--- a/config/examples/Anet/A8/Configuration_adv.h
+++ b/config/examples/Anet/A8/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Anet/A8plus/Configuration_adv.h b/config/examples/Anet/A8plus/Configuration_adv.h
index 53586166a..6e316f8ef 100644
--- a/config/examples/Anet/A8plus/Configuration_adv.h
+++ b/config/examples/Anet/A8plus/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Anet/E16/Configuration_adv.h b/config/examples/Anet/E16/Configuration_adv.h
index 655959ccf..a03866045 100644
--- a/config/examples/Anet/E16/Configuration_adv.h
+++ b/config/examples/Anet/E16/Configuration_adv.h
@@ -2462,10 +2462,6 @@
#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/AnyCubic/i3/Configuration_adv.h b/config/examples/AnyCubic/i3/Configuration_adv.h
index 366cadad2..71c4de309 100644
--- a/config/examples/AnyCubic/i3/Configuration_adv.h
+++ b/config/examples/AnyCubic/i3/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/ArmEd/Configuration_adv.h b/config/examples/ArmEd/Configuration_adv.h
index 56383b551..52018cea9 100644
--- a/config/examples/ArmEd/Configuration_adv.h
+++ b/config/examples/ArmEd/Configuration_adv.h
@@ -2466,10 +2466,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2550,6 +2546,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
index 1694d3983..c66417e0c 100644
--- a/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
+++ b/config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/BIBO/TouchX/default/Configuration_adv.h b/config/examples/BIBO/TouchX/default/Configuration_adv.h
index 36127da61..5fe76986b 100644
--- a/config/examples/BIBO/TouchX/default/Configuration_adv.h
+++ b/config/examples/BIBO/TouchX/default/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/BQ/Hephestos/Configuration_adv.h b/config/examples/BQ/Hephestos/Configuration_adv.h
index bb8be36ab..f4d751d6e 100644
--- a/config/examples/BQ/Hephestos/Configuration_adv.h
+++ b/config/examples/BQ/Hephestos/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/BQ/Hephestos_2/Configuration_adv.h b/config/examples/BQ/Hephestos_2/Configuration_adv.h
index 84deaedbf..47d61d3e2 100644
--- a/config/examples/BQ/Hephestos_2/Configuration_adv.h
+++ b/config/examples/BQ/Hephestos_2/Configuration_adv.h
@@ -2470,10 +2470,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2554,6 +2550,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/BQ/WITBOX/Configuration_adv.h b/config/examples/BQ/WITBOX/Configuration_adv.h
index bb8be36ab..f4d751d6e 100644
--- a/config/examples/BQ/WITBOX/Configuration_adv.h
+++ b/config/examples/BQ/WITBOX/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Cartesio/Configuration_adv.h b/config/examples/Cartesio/Configuration_adv.h
index 89788cba9..680a27109 100644
--- a/config/examples/Cartesio/Configuration_adv.h
+++ b/config/examples/Cartesio/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-10/Configuration_adv.h b/config/examples/Creality/CR-10/Configuration_adv.h
index c0fed523e..a24ee4335 100644
--- a/config/examples/Creality/CR-10/Configuration_adv.h
+++ b/config/examples/Creality/CR-10/Configuration_adv.h
@@ -2465,10 +2465,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2549,6 +2545,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-10S/Configuration_adv.h b/config/examples/Creality/CR-10S/Configuration_adv.h
index d76d489f9..3039d93b5 100644
--- a/config/examples/Creality/CR-10S/Configuration_adv.h
+++ b/config/examples/Creality/CR-10S/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-10_5S/Configuration_adv.h b/config/examples/Creality/CR-10_5S/Configuration_adv.h
index f1bc2e312..be2706933 100644
--- a/config/examples/Creality/CR-10_5S/Configuration_adv.h
+++ b/config/examples/Creality/CR-10_5S/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-10mini/Configuration_adv.h b/config/examples/Creality/CR-10mini/Configuration_adv.h
index e5e77d0c2..44b247c56 100644
--- a/config/examples/Creality/CR-10mini/Configuration_adv.h
+++ b/config/examples/Creality/CR-10mini/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-20 Pro/Configuration_adv.h b/config/examples/Creality/CR-20 Pro/Configuration_adv.h
index b5af25eb4..0eb08b381 100644
--- a/config/examples/Creality/CR-20 Pro/Configuration_adv.h
+++ b/config/examples/Creality/CR-20 Pro/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-20/Configuration_adv.h b/config/examples/Creality/CR-20/Configuration_adv.h
index ce66bde5f..cdd5071d8 100644
--- a/config/examples/Creality/CR-20/Configuration_adv.h
+++ b/config/examples/Creality/CR-20/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/CR-8/Configuration_adv.h b/config/examples/Creality/CR-8/Configuration_adv.h
index ef477269a..5690f1e5c 100644
--- a/config/examples/Creality/CR-8/Configuration_adv.h
+++ b/config/examples/Creality/CR-8/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/Ender-2/Configuration_adv.h b/config/examples/Creality/Ender-2/Configuration_adv.h
index 197912cc9..49b29c96f 100644
--- a/config/examples/Creality/Ender-2/Configuration_adv.h
+++ b/config/examples/Creality/Ender-2/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/Ender-3/Configuration_adv.h b/config/examples/Creality/Ender-3/Configuration_adv.h
index 28c22fa67..0c19e4a49 100644
--- a/config/examples/Creality/Ender-3/Configuration_adv.h
+++ b/config/examples/Creality/Ender-3/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/Ender-4/Configuration_adv.h b/config/examples/Creality/Ender-4/Configuration_adv.h
index 03495f3fd..18d427c71 100644
--- a/config/examples/Creality/Ender-4/Configuration_adv.h
+++ b/config/examples/Creality/Ender-4/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Creality/Ender-5/Configuration_adv.h b/config/examples/Creality/Ender-5/Configuration_adv.h
index 646765adf..bcc725e71 100644
--- a/config/examples/Creality/Ender-5/Configuration_adv.h
+++ b/config/examples/Creality/Ender-5/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h
index 3f361ad94..c4e7ead07 100644
--- a/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h
+++ b/config/examples/Dagoma/Disco Ultimate/Configuration_adv.h
@@ -2462,10 +2462,6 @@
#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h
index 2eba63106..2ef2d2f48 100755
--- a/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h
+++ b/config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Einstart-S/Configuration_adv.h b/config/examples/Einstart-S/Configuration_adv.h
index 94be91c40..f18712292 100644
--- a/config/examples/Einstart-S/Configuration_adv.h
+++ b/config/examples/Einstart-S/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FYSETC/AIO_II/Configuration_adv.h b/config/examples/FYSETC/AIO_II/Configuration_adv.h
index 86df41771..3eb56b8f3 100644
--- a/config/examples/FYSETC/AIO_II/Configuration_adv.h
+++ b/config/examples/FYSETC/AIO_II/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h b/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h
index cdf808528..859292aba 100644
--- a/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h
+++ b/config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h b/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h
index cdf808528..859292aba 100644
--- a/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h
+++ b/config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h b/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h
index cdf808528..859292aba 100644
--- a/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h
+++ b/config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FYSETC/Cheetah/base/Configuration_adv.h b/config/examples/FYSETC/Cheetah/base/Configuration_adv.h
index cdf808528..859292aba 100644
--- a/config/examples/FYSETC/Cheetah/base/Configuration_adv.h
+++ b/config/examples/FYSETC/Cheetah/base/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FYSETC/F6_13/Configuration_adv.h b/config/examples/FYSETC/F6_13/Configuration_adv.h
index 7f02f13ec..34daecb50 100644
--- a/config/examples/FYSETC/F6_13/Configuration_adv.h
+++ b/config/examples/FYSETC/F6_13/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Felix/Configuration_adv.h b/config/examples/Felix/Configuration_adv.h
index 80cfc8a7b..8f634be47 100644
--- a/config/examples/Felix/Configuration_adv.h
+++ b/config/examples/Felix/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FlashForge/CreatorPro/Configuration_adv.h b/config/examples/FlashForge/CreatorPro/Configuration_adv.h
index 542ee5241..4298a7b92 100644
--- a/config/examples/FlashForge/CreatorPro/Configuration_adv.h
+++ b/config/examples/FlashForge/CreatorPro/Configuration_adv.h
@@ -2461,10 +2461,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2545,6 +2541,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/config/examples/FolgerTech/i3-2020/Configuration_adv.h
index 475df0a70..d76a1e9fb 100644
--- a/config/examples/FolgerTech/i3-2020/Configuration_adv.h
+++ b/config/examples/FolgerTech/i3-2020/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Formbot/Raptor/Configuration_adv.h b/config/examples/Formbot/Raptor/Configuration_adv.h
index 51c33e674..1839493d2 100644
--- a/config/examples/Formbot/Raptor/Configuration_adv.h
+++ b/config/examples/Formbot/Raptor/Configuration_adv.h
@@ -2466,10 +2466,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2550,6 +2546,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
index 1afa20375..0d9836ec2 100644
--- a/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
+++ b/config/examples/Formbot/T_Rex_2+/Configuration_adv.h
@@ -2466,10 +2466,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2550,6 +2546,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Formbot/T_Rex_3/Configuration_adv.h b/config/examples/Formbot/T_Rex_3/Configuration_adv.h
index 1f782f7ac..1202da297 100644
--- a/config/examples/Formbot/T_Rex_3/Configuration_adv.h
+++ b/config/examples/Formbot/T_Rex_3/Configuration_adv.h
@@ -2461,10 +2461,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2545,6 +2541,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Geeetech/A10/Configuration_adv.h b/config/examples/Geeetech/A10/Configuration_adv.h
index 4827c06d0..0d84fb846 100644
--- a/config/examples/Geeetech/A10/Configuration_adv.h
+++ b/config/examples/Geeetech/A10/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Geeetech/A10M/Configuration_adv.h b/config/examples/Geeetech/A10M/Configuration_adv.h
index a200f8bd0..3aecc80de 100644
--- a/config/examples/Geeetech/A10M/Configuration_adv.h
+++ b/config/examples/Geeetech/A10M/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Geeetech/A20M/Configuration_adv.h b/config/examples/Geeetech/A20M/Configuration_adv.h
index bde75b3bc..adff4d988 100644
--- a/config/examples/Geeetech/A20M/Configuration_adv.h
+++ b/config/examples/Geeetech/A20M/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Geeetech/MeCreator2/Configuration_adv.h b/config/examples/Geeetech/MeCreator2/Configuration_adv.h
index cd2889ead..02c2d434e 100644
--- a/config/examples/Geeetech/MeCreator2/Configuration_adv.h
+++ b/config/examples/Geeetech/MeCreator2/Configuration_adv.h
@@ -2461,10 +2461,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2545,6 +2541,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
index 4827c06d0..0d84fb846 100644
--- a/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
+++ b/config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
index 4827c06d0..0d84fb846 100644
--- a/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
+++ b/config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/HMS434/Configuration_adv.h b/config/examples/HMS434/Configuration_adv.h
index 47d41e50b..2afa4fd71 100644
--- a/config/examples/HMS434/Configuration_adv.h
+++ b/config/examples/HMS434/Configuration_adv.h
@@ -2384,10 +2384,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2468,6 +2464,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Infitary/i3-M508/Configuration_adv.h b/config/examples/Infitary/i3-M508/Configuration_adv.h
index c601a7467..73a11bd81 100644
--- a/config/examples/Infitary/i3-M508/Configuration_adv.h
+++ b/config/examples/Infitary/i3-M508/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/JGAurora/A1/Configuration_adv.h b/config/examples/JGAurora/A1/Configuration_adv.h
index ca1b28b3c..05a21dc72 100644
--- a/config/examples/JGAurora/A1/Configuration_adv.h
+++ b/config/examples/JGAurora/A1/Configuration_adv.h
@@ -2467,10 +2467,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/JGAurora/A5/Configuration_adv.h b/config/examples/JGAurora/A5/Configuration_adv.h
index 59b935b9e..835d812f5 100644
--- a/config/examples/JGAurora/A5/Configuration_adv.h
+++ b/config/examples/JGAurora/A5/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/JGAurora/A5S/Configuration_adv.h b/config/examples/JGAurora/A5S/Configuration_adv.h
index ca1b28b3c..05a21dc72 100644
--- a/config/examples/JGAurora/A5S/Configuration_adv.h
+++ b/config/examples/JGAurora/A5S/Configuration_adv.h
@@ -2467,10 +2467,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/MakerParts/Configuration_adv.h b/config/examples/MakerParts/Configuration_adv.h
index ed415f809..63394b39d 100644
--- a/config/examples/MakerParts/Configuration_adv.h
+++ b/config/examples/MakerParts/Configuration_adv.h
@@ -2455,10 +2455,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2539,6 +2535,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Malyan/M150/Configuration_adv.h b/config/examples/Malyan/M150/Configuration_adv.h
index 81960731c..0fc00b7ca 100644
--- a/config/examples/Malyan/M150/Configuration_adv.h
+++ b/config/examples/Malyan/M150/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Malyan/M200/Configuration_adv.h b/config/examples/Malyan/M200/Configuration_adv.h
index 6f139382a..f87f6e800 100644
--- a/config/examples/Malyan/M200/Configuration_adv.h
+++ b/config/examples/Malyan/M200/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/config/examples/Micromake/C1/enhanced/Configuration_adv.h
index 115b2a5c0..ea3b96184 100644
--- a/config/examples/Micromake/C1/enhanced/Configuration_adv.h
+++ b/config/examples/Micromake/C1/enhanced/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Mks/Robin/Configuration_adv.h b/config/examples/Mks/Robin/Configuration_adv.h
index b5bc37060..bf2595505 100644
--- a/config/examples/Mks/Robin/Configuration_adv.h
+++ b/config/examples/Mks/Robin/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Mks/Sbase/Configuration_adv.h b/config/examples/Mks/Sbase/Configuration_adv.h
index 811f66ff2..1a607ac4b 100644
--- a/config/examples/Mks/Sbase/Configuration_adv.h
+++ b/config/examples/Mks/Sbase/Configuration_adv.h
@@ -2463,10 +2463,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/RapideLite/RL200/Configuration_adv.h b/config/examples/RapideLite/RL200/Configuration_adv.h
index 7190339f0..810613771 100644
--- a/config/examples/RapideLite/RL200/Configuration_adv.h
+++ b/config/examples/RapideLite/RL200/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/RigidBot/Configuration_adv.h b/config/examples/RigidBot/Configuration_adv.h
index 2444d6005..51c88384a 100644
--- a/config/examples/RigidBot/Configuration_adv.h
+++ b/config/examples/RigidBot/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/SCARA/Configuration_adv.h b/config/examples/SCARA/Configuration_adv.h
index ad90daf38..b22f88e74 100644
--- a/config/examples/SCARA/Configuration_adv.h
+++ b/config/examples/SCARA/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h
index 40ced02de..a96aef970 100644
--- a/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h
+++ b/config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Sanguinololu/Configuration_adv.h b/config/examples/Sanguinololu/Configuration_adv.h
index f952cb810..29a2abd7a 100644
--- a/config/examples/Sanguinololu/Configuration_adv.h
+++ b/config/examples/Sanguinololu/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Tevo/Michelangelo/Configuration_adv.h b/config/examples/Tevo/Michelangelo/Configuration_adv.h
index 53a58506c..4cad2a925 100644
--- a/config/examples/Tevo/Michelangelo/Configuration_adv.h
+++ b/config/examples/Tevo/Michelangelo/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h
index e24db86c0..8d37dee77 100755
--- a/config/examples/Tevo/Tarantula Pro/Configuration_adv.h
+++ b/config/examples/Tevo/Tarantula Pro/Configuration_adv.h
@@ -2458,10 +2458,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2542,6 +2538,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h
index d9fd8aaf9..f97f72eb1 100755
--- a/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h
+++ b/config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h
index d9fd8aaf9..f97f72eb1 100755
--- a/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h
+++ b/config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/TheBorg/Configuration_adv.h b/config/examples/TheBorg/Configuration_adv.h
index acd46d1b8..548ba0415 100644
--- a/config/examples/TheBorg/Configuration_adv.h
+++ b/config/examples/TheBorg/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/TinyBoy2/Configuration_adv.h b/config/examples/TinyBoy2/Configuration_adv.h
index 9e00b3644..ed17f88c2 100644
--- a/config/examples/TinyBoy2/Configuration_adv.h
+++ b/config/examples/TinyBoy2/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Tronxy/X3A/Configuration_adv.h b/config/examples/Tronxy/X3A/Configuration_adv.h
index bd0e41fea..4de9a8195 100644
--- a/config/examples/Tronxy/X3A/Configuration_adv.h
+++ b/config/examples/Tronxy/X3A/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Tronxy/X5S-2E/Configuration_adv.h b/config/examples/Tronxy/X5S-2E/Configuration_adv.h
index 4540c2a34..890f23f58 100644
--- a/config/examples/Tronxy/X5S-2E/Configuration_adv.h
+++ b/config/examples/Tronxy/X5S-2E/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/UltiMachine/Archim1/Configuration_adv.h b/config/examples/UltiMachine/Archim1/Configuration_adv.h
index d27997be0..eeac2772d 100644
--- a/config/examples/UltiMachine/Archim1/Configuration_adv.h
+++ b/config/examples/UltiMachine/Archim1/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/UltiMachine/Archim2/Configuration_adv.h b/config/examples/UltiMachine/Archim2/Configuration_adv.h
index c753b3f51..68de71aaf 100644
--- a/config/examples/UltiMachine/Archim2/Configuration_adv.h
+++ b/config/examples/UltiMachine/Archim2/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/VORONDesign/Configuration_adv.h b/config/examples/VORONDesign/Configuration_adv.h
index 3b474cf6b..de4e0ae81 100644
--- a/config/examples/VORONDesign/Configuration_adv.h
+++ b/config/examples/VORONDesign/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Velleman/K8200/Configuration_adv.h b/config/examples/Velleman/K8200/Configuration_adv.h
index 142da6fc9..b06c63457 100644
--- a/config/examples/Velleman/K8200/Configuration_adv.h
+++ b/config/examples/Velleman/K8200/Configuration_adv.h
@@ -2475,10 +2475,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2559,6 +2555,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Velleman/K8400/Configuration_adv.h b/config/examples/Velleman/K8400/Configuration_adv.h
index 9a7d7194a..9cc8b8ad7 100644
--- a/config/examples/Velleman/K8400/Configuration_adv.h
+++ b/config/examples/Velleman/K8400/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/WASP/PowerWASP/Configuration_adv.h b/config/examples/WASP/PowerWASP/Configuration_adv.h
index 2b727784c..e33415267 100644
--- a/config/examples/WASP/PowerWASP/Configuration_adv.h
+++ b/config/examples/WASP/PowerWASP/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
index 05caad71b..d8c20c700 100644
--- a/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
+++ b/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h b/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h
index f2a57cd90..3b74b2e52 100644
--- a/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h
+++ b/config/examples/Wanhao/Duplicator i3 Mini/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
index 61f4bd528..ad6e65b7f 100644
--- a/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
+++ b/config/examples/delta/Anycubic/Kossel/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h b/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h
index f1c2c80a2..4fd379f25 100644
--- a/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h
+++ b/config/examples/delta/Dreammaker/Overlord/Configuration_adv.h
@@ -2452,10 +2452,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2536,6 +2532,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h
index f1c2c80a2..4fd379f25 100644
--- a/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h
+++ b/config/examples/delta/Dreammaker/Overlord_Pro/Configuration_adv.h
@@ -2452,10 +2452,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2536,6 +2532,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
index 864408867..17512317d 100644
--- a/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
+++ b/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/config/examples/delta/FLSUN/kossel/Configuration_adv.h
index 864408867..17512317d 100644
--- a/config/examples/delta/FLSUN/kossel/Configuration_adv.h
+++ b/config/examples/delta/FLSUN/kossel/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
index 9b1308dd6..3c644e1b7 100644
--- a/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
+++ b/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
index f5efe4237..e9ceba9bf 100644
--- a/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
+++ b/config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/MKS/SBASE/Configuration_adv.h b/config/examples/delta/MKS/SBASE/Configuration_adv.h
index bfa0d9133..4ca71cc92 100644
--- a/config/examples/delta/MKS/SBASE/Configuration_adv.h
+++ b/config/examples/delta/MKS/SBASE/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/Tevo Little Monster/Configuration_adv.h b/config/examples/delta/Tevo Little Monster/Configuration_adv.h
index d47419395..ab8ce275b 100644
--- a/config/examples/delta/Tevo Little Monster/Configuration_adv.h
+++ b/config/examples/delta/Tevo Little Monster/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/generic/Configuration_adv.h b/config/examples/delta/generic/Configuration_adv.h
index 9b1308dd6..3c644e1b7 100644
--- a/config/examples/delta/generic/Configuration_adv.h
+++ b/config/examples/delta/generic/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/kossel_mini/Configuration_adv.h b/config/examples/delta/kossel_mini/Configuration_adv.h
index 9b1308dd6..3c644e1b7 100644
--- a/config/examples/delta/kossel_mini/Configuration_adv.h
+++ b/config/examples/delta/kossel_mini/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/delta/kossel_xl/Configuration_adv.h b/config/examples/delta/kossel_xl/Configuration_adv.h
index f5c45622e..ff4856232 100644
--- a/config/examples/delta/kossel_xl/Configuration_adv.h
+++ b/config/examples/delta/kossel_xl/Configuration_adv.h
@@ -2464,10 +2464,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/config/examples/gCreate/gMax1.5+/Configuration_adv.h
index 82ddab955..2dbbd149c 100644
--- a/config/examples/gCreate/gMax1.5+/Configuration_adv.h
+++ b/config/examples/gCreate/gMax1.5+/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/makibox/Configuration_adv.h b/config/examples/makibox/Configuration_adv.h
index 8bbc97012..ccf17b5f9 100644
--- a/config/examples/makibox/Configuration_adv.h
+++ b/config/examples/makibox/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/tvrrug/Round2/Configuration_adv.h b/config/examples/tvrrug/Round2/Configuration_adv.h
index 68bbfb6ad..31ca42a10 100644
--- a/config/examples/tvrrug/Round2/Configuration_adv.h
+++ b/config/examples/tvrrug/Round2/Configuration_adv.h
@@ -2462,10 +2462,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*
diff --git a/config/examples/wt150/Configuration_adv.h b/config/examples/wt150/Configuration_adv.h
index 3cd660dd8..19e912d9c 100644
--- a/config/examples/wt150/Configuration_adv.h
+++ b/config/examples/wt150/Configuration_adv.h
@@ -2463,10 +2463,6 @@
//#define HOST_PROMPT_SUPPORT
#endif
-//===========================================================================
-//====================== I2C Position Encoder Settings ======================
-//===========================================================================
-
/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
#endif // I2C_POSITION_ENCODERS
+/**
+ * Analog Joystick(s)
+ */
+//#define JOYSTICK
+#if ENABLED(JOYSTICK)
+ #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
+ #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
+ #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
+ #define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2
+
+ // Use M119 to find reasonable values after connecting your hardware:
+ #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
+ #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
+ #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
+#endif
+
/**
* MAX7219 Debug Matrix
*