Browse Source

Analog joystick jogging control (#14648)

Jamie 4 years ago
parent
commit
dbee0e9c54
100 changed files with 1682 additions and 370 deletions
  1. 16
    4
      Marlin/Configuration_adv.h
  2. 27
    4
      Marlin/src/HAL/HAL_STM32F1/HAL.cpp
  3. 8
    0
      Marlin/src/Marlin.cpp
  4. 2
    0
      Marlin/src/core/serial.h
  5. 1
    1
      Marlin/src/feature/I2CPositionEncoder.cpp
  6. 1
    1
      Marlin/src/feature/I2CPositionEncoder.h
  7. 1
    1
      Marlin/src/feature/bedlevel/ubl/ubl.cpp
  8. 151
    0
      Marlin/src/feature/joystick.cpp
  9. 53
    0
      Marlin/src/feature/joystick.h
  10. 2
    6
      Marlin/src/gcode/parser.h
  11. 5
    0
      Marlin/src/inc/Conditionals_adv.h
  12. 7
    0
      Marlin/src/inc/Conditionals_post.h
  13. 9
    0
      Marlin/src/module/endstops.cpp
  14. 51
    0
      Marlin/src/module/temperature.cpp
  15. 19
    20
      Marlin/src/module/temperature.h
  16. 1
    1
      buildroot/share/tests/megaatmega2560-tests
  17. 16
    4
      config/default/Configuration_adv.h
  18. 16
    4
      config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  19. 16
    4
      config/examples/ADIMLab/Gantry v1/Configuration_adv.h
  20. 16
    4
      config/examples/ADIMLab/Gantry v2/Configuration_adv.h
  21. 16
    4
      config/examples/AlephObjects/TAZ4/Configuration_adv.h
  22. 16
    4
      config/examples/Alfawise/U20-bltouch/Configuration_adv.h
  23. 16
    4
      config/examples/Alfawise/U20/Configuration_adv.h
  24. 16
    4
      config/examples/AliExpress/UM2pExt/Configuration_adv.h
  25. 16
    4
      config/examples/Anet/A2/Configuration_adv.h
  26. 16
    4
      config/examples/Anet/A2plus/Configuration_adv.h
  27. 16
    4
      config/examples/Anet/A6/Configuration_adv.h
  28. 16
    4
      config/examples/Anet/A8/Configuration_adv.h
  29. 16
    4
      config/examples/Anet/A8plus/Configuration_adv.h
  30. 16
    4
      config/examples/Anet/E16/Configuration_adv.h
  31. 16
    4
      config/examples/AnyCubic/i3/Configuration_adv.h
  32. 16
    4
      config/examples/ArmEd/Configuration_adv.h
  33. 16
    4
      config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  34. 16
    4
      config/examples/BIBO/TouchX/default/Configuration_adv.h
  35. 16
    4
      config/examples/BQ/Hephestos/Configuration_adv.h
  36. 16
    4
      config/examples/BQ/Hephestos_2/Configuration_adv.h
  37. 16
    4
      config/examples/BQ/WITBOX/Configuration_adv.h
  38. 16
    4
      config/examples/Cartesio/Configuration_adv.h
  39. 16
    4
      config/examples/Creality/CR-10/Configuration_adv.h
  40. 16
    4
      config/examples/Creality/CR-10S/Configuration_adv.h
  41. 16
    4
      config/examples/Creality/CR-10_5S/Configuration_adv.h
  42. 16
    4
      config/examples/Creality/CR-10mini/Configuration_adv.h
  43. 16
    4
      config/examples/Creality/CR-20 Pro/Configuration_adv.h
  44. 16
    4
      config/examples/Creality/CR-20/Configuration_adv.h
  45. 16
    4
      config/examples/Creality/CR-8/Configuration_adv.h
  46. 16
    4
      config/examples/Creality/Ender-2/Configuration_adv.h
  47. 16
    4
      config/examples/Creality/Ender-3/Configuration_adv.h
  48. 16
    4
      config/examples/Creality/Ender-4/Configuration_adv.h
  49. 16
    4
      config/examples/Creality/Ender-5/Configuration_adv.h
  50. 16
    4
      config/examples/Dagoma/Disco Ultimate/Configuration_adv.h
  51. 16
    4
      config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h
  52. 16
    4
      config/examples/Einstart-S/Configuration_adv.h
  53. 16
    4
      config/examples/FYSETC/AIO_II/Configuration_adv.h
  54. 16
    4
      config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h
  55. 16
    4
      config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h
  56. 16
    4
      config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h
  57. 16
    4
      config/examples/FYSETC/Cheetah/base/Configuration_adv.h
  58. 16
    4
      config/examples/FYSETC/F6_13/Configuration_adv.h
  59. 16
    4
      config/examples/Felix/Configuration_adv.h
  60. 16
    4
      config/examples/FlashForge/CreatorPro/Configuration_adv.h
  61. 16
    4
      config/examples/FolgerTech/i3-2020/Configuration_adv.h
  62. 16
    4
      config/examples/Formbot/Raptor/Configuration_adv.h
  63. 16
    4
      config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  64. 16
    4
      config/examples/Formbot/T_Rex_3/Configuration_adv.h
  65. 16
    4
      config/examples/Geeetech/A10/Configuration_adv.h
  66. 16
    4
      config/examples/Geeetech/A10M/Configuration_adv.h
  67. 16
    4
      config/examples/Geeetech/A20M/Configuration_adv.h
  68. 16
    4
      config/examples/Geeetech/MeCreator2/Configuration_adv.h
  69. 16
    4
      config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  70. 16
    4
      config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  71. 16
    4
      config/examples/HMS434/Configuration_adv.h
  72. 16
    4
      config/examples/Infitary/i3-M508/Configuration_adv.h
  73. 16
    4
      config/examples/JGAurora/A1/Configuration_adv.h
  74. 16
    4
      config/examples/JGAurora/A5/Configuration_adv.h
  75. 16
    4
      config/examples/JGAurora/A5S/Configuration_adv.h
  76. 16
    4
      config/examples/MakerParts/Configuration_adv.h
  77. 16
    4
      config/examples/Malyan/M150/Configuration_adv.h
  78. 16
    4
      config/examples/Malyan/M200/Configuration_adv.h
  79. 16
    4
      config/examples/Micromake/C1/enhanced/Configuration_adv.h
  80. 16
    4
      config/examples/Mks/Robin/Configuration_adv.h
  81. 16
    4
      config/examples/Mks/Sbase/Configuration_adv.h
  82. 16
    4
      config/examples/RapideLite/RL200/Configuration_adv.h
  83. 16
    4
      config/examples/RigidBot/Configuration_adv.h
  84. 16
    4
      config/examples/SCARA/Configuration_adv.h
  85. 16
    4
      config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h
  86. 16
    4
      config/examples/Sanguinololu/Configuration_adv.h
  87. 16
    4
      config/examples/Tevo/Michelangelo/Configuration_adv.h
  88. 16
    4
      config/examples/Tevo/Tarantula Pro/Configuration_adv.h
  89. 16
    4
      config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h
  90. 16
    4
      config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h
  91. 16
    4
      config/examples/TheBorg/Configuration_adv.h
  92. 16
    4
      config/examples/TinyBoy2/Configuration_adv.h
  93. 16
    4
      config/examples/Tronxy/X3A/Configuration_adv.h
  94. 16
    4
      config/examples/Tronxy/X5S-2E/Configuration_adv.h
  95. 16
    4
      config/examples/UltiMachine/Archim1/Configuration_adv.h
  96. 16
    4
      config/examples/UltiMachine/Archim2/Configuration_adv.h
  97. 16
    4
      config/examples/VORONDesign/Configuration_adv.h
  98. 16
    4
      config/examples/Velleman/K8200/Configuration_adv.h
  99. 16
    4
      config/examples/Velleman/K8400/Configuration_adv.h
  100. 0
    0
      config/examples/WASP/PowerWASP/Configuration_adv.h

+ 16
- 4
Marlin/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 27
- 4
Marlin/src/HAL/HAL_STM32F1/HAL.cpp View File

@@ -121,6 +121,15 @@ const uint8_t adc_pins[] = {
121 121
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
122 122
     FILWIDTH_PIN,
123 123
   #endif
124
+  #if HAS_JOY_ADC_X
125
+    JOY_X_PIN,
126
+  #endif
127
+  #if HAS_JOY_ADC_Y
128
+    JOY_Y_PIN,
129
+  #endif
130
+  #if HAS_JOY_ADC_Z
131
+    JOY_Z_PIN,
132
+  #endif
124 133
 };
125 134
 
126 135
 enum TEMP_PINS : char {
@@ -151,16 +160,21 @@ enum TEMP_PINS : char {
151 160
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
152 161
     FILWIDTH,
153 162
   #endif
163
+  #if HAS_JOY_ADC_X
164
+    JOY_X,
165
+  #endif
166
+  #if HAS_JOY_ADC_Y
167
+    JOY_Y,
168
+  #endif
169
+  #if HAS_JOY_ADC_Z
170
+    JOY_Z,
171
+  #endif
154 172
   ADC_PIN_COUNT
155 173
 };
156 174
 
157 175
 uint16_t HAL_adc_results[ADC_PIN_COUNT];
158 176
 
159 177
 // ------------------------
160
-// Function prototypes
161
-// ------------------------
162
-
163
-// ------------------------
164 178
 // Private functions
165 179
 // ------------------------
166 180
 static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) {
@@ -305,6 +319,15 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
305 319
     #if HAS_TEMP_ADC_5
306 320
       case TEMP_5_PIN: pin_index = TEMP_5; break;
307 321
     #endif
322
+    #if HAS_JOY_ADC_X
323
+      case JOY_X_PIN: pin_index = JOY_X; break;
324
+    #endif
325
+    #if HAS_JOY_ADC_Y
326
+      case JOY_Y_PIN: pin_index = JOY_Y; break;
327
+    #endif
328
+    #if HAS_JOY_ADC_Z
329
+      case JOY_Z_PIN: pin_index = JOY_Z; break;
330
+    #endif
308 331
     #if ENABLED(FILAMENT_WIDTH_SENSOR)
309 332
       case FILWIDTH_PIN: pin_index = FILWIDTH; break;
310 333
     #endif

+ 8
- 0
Marlin/src/Marlin.cpp View File

@@ -89,6 +89,10 @@
89 89
   #include "feature/bltouch.h"
90 90
 #endif
91 91
 
92
+#if ENABLED(POLL_JOG)
93
+  #include "feature/joystick.h"
94
+#endif
95
+
92 96
 #if HAS_SERVOS
93 97
   #include "module/servo.h"
94 98
 #endif
@@ -739,6 +743,10 @@ void idle(
739 743
   #if ENABLED(PRUSA_MMU2)
740 744
     mmu2.mmu_loop();
741 745
   #endif
746
+
747
+  #if ENABLED(POLL_JOG)
748
+    joystick.inject_jog_moves();
749
+  #endif
742 750
 }
743 751
 
744 752
 /**

+ 2
- 0
Marlin/src/core/serial.h View File

@@ -156,6 +156,8 @@ extern uint8_t marlin_debug_flags;
156 156
 
157 157
 #define SERIAL_ECHO_SP(C)           serial_spaces(C)
158 158
 
159
+#define SERIAL_ECHO_TERNARY(TF, PRE, ON, OFF, POST) serial_ternary(TF, PSTR(PRE), PSTR(ON), PSTR(OFF), PSTR(POST))
160
+
159 161
 //
160 162
 // Functions for serial printing from PROGMEM. (Saves loads of SRAM.)
161 163
 //

+ 1
- 1
Marlin/src/feature/I2CPositionEncoder.cpp View File

@@ -233,7 +233,7 @@ bool I2CPositionEncoder::passes_test(const bool report) {
233 233
     switch (H) {
234 234
       case I2CPE_MAG_SIG_GOOD:
235 235
       case I2CPE_MAG_SIG_MID:
236
-        serial_ternary(H == I2CPE_MAG_SIG_GOOD, PSTR("passes test; field strength "), PSTR("good"), PSTR("fair"), PSTR(".\n"));
236
+        SERIAL_ECHO_TERNARY(H == I2CPE_MAG_SIG_GOOD, "passes test; field strength ", "good", "fair", ".\n");
237 237
         break;
238 238
       default:
239 239
         SERIAL_ECHOLNPGM("not detected!");

+ 1
- 1
Marlin/src/feature/I2CPositionEncoder.h View File

@@ -276,7 +276,7 @@ class I2CPositionEncodersMgr {
276 276
       CHECK_IDX();
277 277
       encoders[idx].set_ec_enabled(enabled);
278 278
       SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]);
279
-      serial_ternary(encoders[idx].get_ec_enabled(), PSTR(" axis is "), PSTR("en"), PSTR("dis"), PSTR("abled.\n"));
279
+      SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n");
280 280
     }
281 281
 
282 282
     static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) {

+ 1
- 1
Marlin/src/feature/bedlevel/ubl/ubl.cpp View File

@@ -58,7 +58,7 @@
58 58
 
59 59
   void unified_bed_leveling::report_state() {
60 60
     echo_name();
61
-    serial_ternary(planner.leveling_active, PSTR(" System v" UBL_VERSION " "), PSTR(""), PSTR("in"), PSTR("active\n"));
61
+    SERIAL_ECHO_TERNARY(planner.leveling_active, " System v" UBL_VERSION " ", "", "in", "active\n");
62 62
     serial_delay(50);
63 63
   }
64 64
 

+ 151
- 0
Marlin/src/feature/joystick.cpp View File

@@ -0,0 +1,151 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+
23
+/**
24
+ * joystick.cpp - joystick input / jogging
25
+ */
26
+
27
+#include "../inc/MarlinConfigPre.h"
28
+
29
+#if ENABLED(JOYSTICK)
30
+
31
+#include "joystick.h"
32
+
33
+#include "../inc/MarlinConfig.h"  // for pins
34
+#include "../module/planner.h"
35
+#include "../module/temperature.h"
36
+
37
+Joystick joystick;
38
+
39
+#if HAS_JOY_ADC_X
40
+  temp_info_t Joystick::x; // = { 0 }
41
+#endif
42
+#if HAS_JOY_ADC_Y
43
+  temp_info_t Joystick::y; // = { 0 }
44
+#endif
45
+#if HAS_JOY_ADC_Z
46
+  temp_info_t Joystick::z; // = { 0 }
47
+#endif
48
+
49
+#if ENABLED(JOYSTICK_DEBUG)
50
+  void Joystick::report() {
51
+    SERIAL_ECHOPGM("Joystick");
52
+    #if HAS_JOY_ADC_X
53
+      SERIAL_ECHOPAIR(" X", x.raw);
54
+    #endif
55
+    #if HAS_JOY_ADC_Y
56
+      SERIAL_ECHOPAIR(" Y", y.raw);
57
+    #endif
58
+    #if HAS_JOY_ADC_Z
59
+      SERIAL_ECHOPAIR(" Z", z.raw);
60
+    #endif
61
+    #if HAS_JOY_ADC_EN
62
+      SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");
63
+    #endif
64
+    SERIAL_EOL();
65
+  }
66
+#endif
67
+
68
+void Joystick::calculate(float norm_jog[XYZ]) {
69
+  // Do nothing if enable pin (active-low) is not LOW
70
+  #if HAS_JOY_ADC_EN
71
+    if (READ(JOY_EN_PIN)) return;
72
+  #endif
73
+
74
+  auto _normalize_joy = [](float &adc, const int16_t raw, const int16_t (&joy_limits)[4]) {
75
+    if (WITHIN(raw, joy_limits[0], joy_limits[3])) {
76
+      // within limits, check deadzone
77
+      if (raw > joy_limits[2])
78
+        adc = (raw - joy_limits[2]) / float(joy_limits[3] - joy_limits[2]);
79
+      else if (raw < joy_limits[1])
80
+        adc = (raw - joy_limits[1]) / float(joy_limits[1] - joy_limits[0]);  // negative value
81
+    }
82
+  };
83
+
84
+  #if HAS_JOY_ADC_X
85
+    static constexpr int16_t joy_x_limits[4] = JOY_X_LIMITS;
86
+    _normalize_joy(norm_jog[X_AXIS], x.raw, joy_x_limits);
87
+  #endif
88
+  #if HAS_JOY_ADC_Y
89
+    static constexpr int16_t joy_y_limits[4] = JOY_Y_LIMITS;
90
+    _normalize_joy(norm_jog[Y_AXIS], y.raw, joy_y_limits);
91
+  #endif
92
+  #if HAS_JOY_ADC_Z
93
+    static constexpr int16_t joy_z_limits[4] = JOY_Z_LIMITS;
94
+    _normalize_joy(norm_jog[Z_AXIS], z.raw, joy_z_limits);
95
+  #endif
96
+}
97
+
98
+#if ENABLED(POLL_JOG)
99
+
100
+  void Joystick::inject_jog_moves() {
101
+    // Recursion barrier
102
+    static bool injecting_now; // = false;
103
+    if (injecting_now) return;
104
+
105
+    static constexpr int QUEUE_DEPTH = 5;                                 // Insert up to this many movements
106
+    static constexpr float target_lag = 0.25f,                            // Aim for 1/4 second lag
107
+                           seg_time = target_lag / QUEUE_DEPTH;           // 0.05 seconds, short segments inserted every 1/20th of a second
108
+    static constexpr millis_t timer_limit_ms = millis_t(seg_time * 500);  // 25 ms minimum delay between insertions
109
+
110
+    // The planner can merge/collapse small moves, so the movement queue is unreliable to control the lag
111
+    static millis_t next_run = 0;
112
+    if (PENDING(millis(), next_run)) return;
113
+    next_run = millis() + timer_limit_ms;
114
+
115
+    // Only inject a command if the planner has fewer than 5 moves and there are no unparsed commands
116
+    if (planner.movesplanned() >= QUEUE_DEPTH || queue.has_commands_queued())
117
+      return;
118
+
119
+    // Normalized jog values are 0 for no movement and -1 or +1 for as max feedrate (nonlinear relationship)
120
+    // Jog are initialized to zero and handling input can update values but doesn't have to
121
+    // You could use a two-axis joystick and a one-axis keypad and they might work together
122
+    float norm_jog[XYZ] = { 0 };
123
+
124
+    // Use ADC values and defined limits. The active zone is normalized: -1..0 (dead) 0..1
125
+    joystick.calculate(norm_jog);
126
+
127
+    // Other non-joystick poll-based jogging could be implemented here
128
+    // with "jogging" encapsulated as a more general class.
129
+
130
+    // Jogging value maps continuously (quadratic relationship) to feedrate
131
+    float move_dist[XYZ] = { 0 }, hypot2 = 0;
132
+    LOOP_XYZ(i) if (norm_jog[i]) {
133
+      move_dist[i] = seg_time * sq(norm_jog[i]) * planner.settings.max_feedrate_mm_s[i];
134
+      // Very small movements disappear when printed as decimal with 4 digits of precision
135
+      NOLESS(move_dist[i], 0.0002f);
136
+      if (norm_jog[i] < 0) move_dist[i] *= -1;  // preserve sign
137
+      hypot2 += sq(move_dist[i]);
138
+    }
139
+
140
+    if (!UNEAR_ZERO(hypot2)) {
141
+      LOOP_XYZ(i) current_position[i] += move_dist[i];
142
+      const float length = sqrt(hypot2);
143
+      injecting_now = true;
144
+      planner.buffer_line(current_position, length / seg_time, active_extruder, length);
145
+      injecting_now = false;
146
+    }
147
+  }
148
+
149
+#endif // POLL_JOG
150
+
151
+#endif // JOYSTICK

+ 53
- 0
Marlin/src/feature/joystick.h View File

@@ -0,0 +1,53 @@
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
23
+
24
+/**
25
+ * joystick.h - joystick input / jogging
26
+ */
27
+
28
+#include "../core/macros.h"
29
+#include "../module/temperature.h"
30
+
31
+//#define JOYSTICK_DEBUG
32
+
33
+class Joystick {
34
+  friend class Temperature;
35
+  private:
36
+    #if HAS_JOY_ADC_X
37
+      static temp_info_t x;
38
+    #endif
39
+    #if HAS_JOY_ADC_Y
40
+      static temp_info_t y;
41
+    #endif
42
+    #if HAS_JOY_ADC_Z
43
+      static temp_info_t z;
44
+    #endif
45
+  public:
46
+    #if ENABLED(JOYSTICK_DEBUG)
47
+      static void report();
48
+    #endif
49
+    static void calculate(float norm_jog[XYZ]);
50
+    static void inject_jog_moves();
51
+};
52
+
53
+extern Joystick joystick;

+ 2
- 6
Marlin/src/gcode/parser.h View File

@@ -263,13 +263,9 @@ public:
263 263
 
264 264
     static inline void set_input_linear_units(const LinearUnit units) {
265 265
       switch (units) {
266
-        case LINEARUNIT_INCH:
267
-          linear_unit_factor = 25.4f;
268
-          break;
269
-        case LINEARUNIT_MM:
270 266
         default:
271
-          linear_unit_factor = 1;
272
-          break;
267
+        case LINEARUNIT_MM:   linear_unit_factor =  1.0f; break;
268
+        case LINEARUNIT_INCH: linear_unit_factor = 25.4f; break;
273 269
       }
274 270
       volumetric_unit_factor = POW(linear_unit_factor, 3);
275 271
     }

+ 5
- 0
Marlin/src/inc/Conditionals_adv.h View File

@@ -105,3 +105,8 @@
105 105
 
106 106
 // TMC SPI Chaining
107 107
 #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)
108
+
109
+// Poll-based jogging for joystick and other devices
110
+#if ENABLED(JOYSTICK)
111
+  #define POLL_JOG
112
+#endif

+ 7
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -1026,6 +1026,13 @@
1026 1026
 #define HAS_TEMP_CHAMBER HAS_TEMP_ADC_CHAMBER
1027 1027
 #define HAS_HEATED_CHAMBER (HAS_TEMP_CHAMBER && PIN_EXISTS(HEATER_CHAMBER))
1028 1028
 
1029
+#if ENABLED(JOYSTICK)
1030
+  #define HAS_JOY_ADC_X  PIN_EXISTS(JOY_X)
1031
+  #define HAS_JOY_ADC_Y  PIN_EXISTS(JOY_Y)
1032
+  #define HAS_JOY_ADC_Z  PIN_EXISTS(JOY_Z)
1033
+  #define HAS_JOY_ADC_EN PIN_EXISTS(JOY_EN)
1034
+#endif
1035
+
1029 1036
 // Heaters
1030 1037
 #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0))
1031 1038
 #define HAS_HEATER_1 (PIN_EXISTS(HEATER_1))

+ 9
- 0
Marlin/src/module/endstops.cpp View File

@@ -44,6 +44,10 @@
44 44
   #include "../feature/bltouch.h"
45 45
 #endif
46 46
 
47
+#if ENABLED(JOYSTICK)
48
+  #include "../feature/joystick.h"
49
+#endif
50
+
47 51
 Endstops endstops;
48 52
 
49 53
 // private:
@@ -474,6 +478,11 @@ void _O2 Endstops::M119() {
474 478
   #if ENABLED(BLTOUCH)
475 479
     bltouch._reset_SW_mode();
476 480
   #endif
481
+
482
+  #if ENABLED(JOYSTICK_DEBUG)
483
+    joystick.report();
484
+  #endif
485
+
477 486
 } // Endstops::M119
478 487
 
479 488
 // The following routines are called from an ISR context. It could be the temperature ISR, the

+ 51
- 0
Marlin/src/module/temperature.cpp View File

@@ -64,6 +64,10 @@
64 64
   #include "../feature/leds/printer_event_leds.h"
65 65
 #endif
66 66
 
67
+#if ENABLED(JOYSTICK)
68
+  #include "../feature/joystick.h"
69
+#endif
70
+
67 71
 #if ENABLED(SINGLENOZZLE)
68 72
   #include "tool_change.h"
69 73
 #endif
@@ -1685,6 +1689,18 @@ void Temperature::init() {
1685 1689
   #if HAS_TEMP_ADC_5
1686 1690
     HAL_ANALOG_SELECT(TEMP_5_PIN);
1687 1691
   #endif
1692
+  #if HAS_JOY_ADC_X
1693
+    HAL_ANALOG_SELECT(JOY_X_PIN);
1694
+  #endif
1695
+  #if HAS_JOY_ADC_Y
1696
+    HAL_ANALOG_SELECT(JOY_Y_PIN);
1697
+  #endif
1698
+  #if HAS_JOY_ADC_Z
1699
+    HAL_ANALOG_SELECT(JOY_Z_PIN);
1700
+  #endif
1701
+  #if HAS_JOY_ADC_EN
1702
+    SET_INPUT_PULLUP(JOY_EN_PIN);
1703
+  #endif
1688 1704
   #if HAS_HEATED_BED
1689 1705
     HAL_ANALOG_SELECT(TEMP_BED_PIN);
1690 1706
   #endif
@@ -2195,6 +2211,16 @@ void Temperature::set_current_temp_raw() {
2195 2211
     temp_chamber.update();
2196 2212
   #endif
2197 2213
 
2214
+  #if HAS_JOY_ADC_X
2215
+    joystick.x.update();
2216
+  #endif
2217
+  #if HAS_JOY_ADC_Y
2218
+    joystick.y.update();
2219
+  #endif
2220
+  #if HAS_JOY_ADC_Z
2221
+    joystick.z.update();
2222
+  #endif
2223
+
2198 2224
   temp_meas_ready = true;
2199 2225
 }
2200 2226
 
@@ -2225,6 +2251,16 @@ void Temperature::readings_ready() {
2225 2251
     temp_chamber.reset();
2226 2252
   #endif
2227 2253
 
2254
+  #if HAS_JOY_ADC_X
2255
+    joystick.x.reset();
2256
+  #endif
2257
+  #if HAS_JOY_ADC_Y
2258
+    joystick.y.reset();
2259
+  #endif
2260
+  #if HAS_JOY_ADC_Z
2261
+    joystick.z.reset();
2262
+  #endif
2263
+
2228 2264
   static constexpr int8_t temp_dir[] = {
2229 2265
     #if ENABLED(HEATER_0_USES_MAX6675)
2230 2266
       0
@@ -2721,6 +2757,21 @@ void Temperature::isr() {
2721 2757
       break;
2722 2758
     #endif
2723 2759
 
2760
+    #if HAS_JOY_ADC_X
2761
+      case PrepareJoy_X: HAL_START_ADC(JOY_X_PIN); break;
2762
+      case MeasureJoy_X: ACCUMULATE_ADC(joystick.x); break;
2763
+    #endif
2764
+
2765
+    #if HAS_JOY_ADC_Y
2766
+      case PrepareJoy_Y: HAL_START_ADC(JOY_Y_PIN); break;
2767
+      case MeasureJoy_Y: ACCUMULATE_ADC(joystick.y); break;
2768
+    #endif
2769
+
2770
+    #if HAS_JOY_ADC_Z
2771
+      case PrepareJoy_Z: HAL_START_ADC(JOY_Z_PIN); break;
2772
+      case MeasureJoy_Z: ACCUMULATE_ADC(joystick.z); break;
2773
+    #endif
2774
+
2724 2775
     #if HAS_ADC_BUTTONS
2725 2776
       case Prepare_ADC_KEY: HAL_START_ADC(ADC_KEYPAD_PIN); break;
2726 2777
       case Measure_ADC_KEY:

+ 19
- 20
Marlin/src/module/temperature.h View File

@@ -92,44 +92,43 @@ typedef struct { float Kp, Ki, Kd, Kc; } PIDC_t;
92 92
 enum ADCSensorState : char {
93 93
   StartSampling,
94 94
   #if HAS_TEMP_ADC_0
95
-    PrepareTemp_0,
96
-    MeasureTemp_0,
95
+    PrepareTemp_0, MeasureTemp_0,
97 96
   #endif
98 97
   #if HAS_HEATED_BED
99
-    PrepareTemp_BED,
100
-    MeasureTemp_BED,
98
+    PrepareTemp_BED, MeasureTemp_BED,
101 99
   #endif
102 100
   #if HAS_TEMP_CHAMBER
103
-    PrepareTemp_CHAMBER,
104
-    MeasureTemp_CHAMBER,
101
+    PrepareTemp_CHAMBER, MeasureTemp_CHAMBER,
105 102
   #endif
106 103
   #if HAS_TEMP_ADC_1
107
-    PrepareTemp_1,
108
-    MeasureTemp_1,
104
+    PrepareTemp_1, MeasureTemp_1,
109 105
   #endif
110 106
   #if HAS_TEMP_ADC_2
111
-    PrepareTemp_2,
112
-    MeasureTemp_2,
107
+    PrepareTemp_2, MeasureTemp_2,
113 108
   #endif
114 109
   #if HAS_TEMP_ADC_3
115
-    PrepareTemp_3,
116
-    MeasureTemp_3,
110
+    PrepareTemp_3, MeasureTemp_3,
117 111
   #endif
118 112
   #if HAS_TEMP_ADC_4
119
-    PrepareTemp_4,
120
-    MeasureTemp_4,
113
+    PrepareTemp_4, MeasureTemp_4,
121 114
   #endif
122 115
   #if HAS_TEMP_ADC_5
123
-    PrepareTemp_5,
124
-    MeasureTemp_5,
116
+    PrepareTemp_5, MeasureTemp_5,
117
+  #endif
118
+  #if HAS_JOY_ADC_X
119
+    PrepareJoy_X, MeasureJoy_X,
120
+  #endif
121
+  #if HAS_JOY_ADC_Y
122
+    PrepareJoy_Y, MeasureJoy_Y,
123
+  #endif
124
+  #if HAS_JOY_ADC_Z
125
+    PrepareJoy_Z, MeasureJoy_Z,
125 126
   #endif
126 127
   #if ENABLED(FILAMENT_WIDTH_SENSOR)
127
-    Prepare_FILWIDTH,
128
-    Measure_FILWIDTH,
128
+    Prepare_FILWIDTH, Measure_FILWIDTH,
129 129
   #endif
130 130
   #if HAS_ADC_BUTTONS
131
-    Prepare_ADC_KEY,
132
-    Measure_ADC_KEY,
131
+    Prepare_ADC_KEY, Measure_ADC_KEY,
133 132
   #endif
134 133
   SensorsReady, // Temperatures ready. Delay the next round of readings to let ADC pins settle.
135 134
   StartupDelay  // Startup, delay initial temp reading a tiny bit so the hardware can settle

+ 1
- 1
buildroot/share/tests/megaatmega2560-tests View File

@@ -79,7 +79,7 @@ restore_configs
79 79
 opt_enable ZONESTAR_LCD Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE \
80 80
            AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS EEPROM_CHITCHAT
81 81
 opt_set NUM_SERVOS 1
82
-opt_enable NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET
82
+opt_enable NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK
83 83
 exec_test $1 $2 "RAMPS with ZONESTAR_LCD, Servo Probe, 3-Point ABL, DEBUG_LEVELING_FEATURE, EEPROM, G38, and more"
84 84
 
85 85
 #

+ 16
- 4
config/default/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/3DFabXYZ/Migbot/Configuration_adv.h View File

@@ -2464,10 +2464,6 @@
2464 2464
   //#define HOST_PROMPT_SUPPORT
2465 2465
 #endif
2466 2466
 
2467
-//===========================================================================
2468
-//====================== I2C Position Encoder Settings ======================
2469
-//===========================================================================
2470
-
2471 2467
 /**
2472 2468
  * I2C position encoders for closed loop control.
2473 2469
  * Developed by Chris Barr at Aus3D.
@@ -2549,6 +2545,22 @@
2549 2545
 #endif // I2C_POSITION_ENCODERS
2550 2546
 
2551 2547
 /**
2548
+ * Analog Joystick(s)
2549
+ */
2550
+//#define JOYSTICK
2551
+#if ENABLED(JOYSTICK)
2552
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2553
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2554
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2555
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2556
+
2557
+  // Use M119 to find reasonable values after connecting your hardware:
2558
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2559
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2560
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2561
+#endif
2562
+
2563
+/**
2552 2564
  * MAX7219 Debug Matrix
2553 2565
  *
2554 2566
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/ADIMLab/Gantry v1/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/ADIMLab/Gantry v2/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Alfawise/U20-bltouch/Configuration_adv.h View File

@@ -2467,10 +2467,6 @@
2467 2467
   //#define HOST_PROMPT_SUPPORT
2468 2468
 #endif
2469 2469
 
2470
-//===========================================================================
2471
-//====================== I2C Position Encoder Settings ======================
2472
-//===========================================================================
2473
-
2474 2470
 /**
2475 2471
  * I2C position encoders for closed loop control.
2476 2472
  * Developed by Chris Barr at Aus3D.
@@ -2552,6 +2548,22 @@
2552 2548
 #endif // I2C_POSITION_ENCODERS
2553 2549
 
2554 2550
 /**
2551
+ * Analog Joystick(s)
2552
+ */
2553
+//#define JOYSTICK
2554
+#if ENABLED(JOYSTICK)
2555
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2556
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2557
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2558
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2559
+
2560
+  // Use M119 to find reasonable values after connecting your hardware:
2561
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2562
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2563
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2564
+#endif
2565
+
2566
+/**
2555 2567
  * MAX7219 Debug Matrix
2556 2568
  *
2557 2569
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Alfawise/U20/Configuration_adv.h View File

@@ -2466,10 +2466,6 @@
2466 2466
   //#define HOST_PROMPT_SUPPORT
2467 2467
 #endif
2468 2468
 
2469
-//===========================================================================
2470
-//====================== I2C Position Encoder Settings ======================
2471
-//===========================================================================
2472
-
2473 2469
 /**
2474 2470
  * I2C position encoders for closed loop control.
2475 2471
  * Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
2551 2547
 #endif // I2C_POSITION_ENCODERS
2552 2548
 
2553 2549
 /**
2550
+ * Analog Joystick(s)
2551
+ */
2552
+//#define JOYSTICK
2553
+#if ENABLED(JOYSTICK)
2554
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2555
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2556
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2557
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2558
+
2559
+  // Use M119 to find reasonable values after connecting your hardware:
2560
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2561
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2562
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2563
+#endif
2564
+
2565
+/**
2554 2566
  * MAX7219 Debug Matrix
2555 2567
  *
2556 2568
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/AliExpress/UM2pExt/Configuration_adv.h View File

@@ -2464,10 +2464,6 @@
2464 2464
   //#define HOST_PROMPT_SUPPORT
2465 2465
 #endif
2466 2466
 
2467
-//===========================================================================
2468
-//====================== I2C Position Encoder Settings ======================
2469
-//===========================================================================
2470
-
2471 2467
 /**
2472 2468
  * I2C position encoders for closed loop control.
2473 2469
  * Developed by Chris Barr at Aus3D.
@@ -2549,6 +2545,22 @@
2549 2545
 #endif // I2C_POSITION_ENCODERS
2550 2546
 
2551 2547
 /**
2548
+ * Analog Joystick(s)
2549
+ */
2550
+//#define JOYSTICK
2551
+#if ENABLED(JOYSTICK)
2552
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2553
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2554
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2555
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2556
+
2557
+  // Use M119 to find reasonable values after connecting your hardware:
2558
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2559
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2560
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2561
+#endif
2562
+
2563
+/**
2552 2564
  * MAX7219 Debug Matrix
2553 2565
  *
2554 2566
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Anet/A2/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Anet/A2plus/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Anet/A6/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Anet/A8/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Anet/A8plus/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Anet/E16/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   #define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/AnyCubic/i3/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/ArmEd/Configuration_adv.h View File

@@ -2466,10 +2466,6 @@
2466 2466
   //#define HOST_PROMPT_SUPPORT
2467 2467
 #endif
2468 2468
 
2469
-//===========================================================================
2470
-//====================== I2C Position Encoder Settings ======================
2471
-//===========================================================================
2472
-
2473 2469
 /**
2474 2470
  * I2C position encoders for closed loop control.
2475 2471
  * Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
2551 2547
 #endif // I2C_POSITION_ENCODERS
2552 2548
 
2553 2549
 /**
2550
+ * Analog Joystick(s)
2551
+ */
2552
+//#define JOYSTICK
2553
+#if ENABLED(JOYSTICK)
2554
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2555
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2556
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2557
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2558
+
2559
+  // Use M119 to find reasonable values after connecting your hardware:
2560
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2561
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2562
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2563
+#endif
2564
+
2565
+/**
2554 2566
  * MAX7219 Debug Matrix
2555 2567
  *
2556 2568
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/BIBO/TouchX/default/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/BQ/Hephestos/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/BQ/Hephestos_2/Configuration_adv.h View File

@@ -2470,10 +2470,6 @@
2470 2470
   //#define HOST_PROMPT_SUPPORT
2471 2471
 #endif
2472 2472
 
2473
-//===========================================================================
2474
-//====================== I2C Position Encoder Settings ======================
2475
-//===========================================================================
2476
-
2477 2473
 /**
2478 2474
  * I2C position encoders for closed loop control.
2479 2475
  * Developed by Chris Barr at Aus3D.
@@ -2555,6 +2551,22 @@
2555 2551
 #endif // I2C_POSITION_ENCODERS
2556 2552
 
2557 2553
 /**
2554
+ * Analog Joystick(s)
2555
+ */
2556
+//#define JOYSTICK
2557
+#if ENABLED(JOYSTICK)
2558
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2559
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2560
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2561
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2562
+
2563
+  // Use M119 to find reasonable values after connecting your hardware:
2564
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2565
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2566
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2567
+#endif
2568
+
2569
+/**
2558 2570
  * MAX7219 Debug Matrix
2559 2571
  *
2560 2572
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/BQ/WITBOX/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Cartesio/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-10/Configuration_adv.h View File

@@ -2465,10 +2465,6 @@
2465 2465
   //#define HOST_PROMPT_SUPPORT
2466 2466
 #endif
2467 2467
 
2468
-//===========================================================================
2469
-//====================== I2C Position Encoder Settings ======================
2470
-//===========================================================================
2471
-
2472 2468
 /**
2473 2469
  * I2C position encoders for closed loop control.
2474 2470
  * Developed by Chris Barr at Aus3D.
@@ -2550,6 +2546,22 @@
2550 2546
 #endif // I2C_POSITION_ENCODERS
2551 2547
 
2552 2548
 /**
2549
+ * Analog Joystick(s)
2550
+ */
2551
+//#define JOYSTICK
2552
+#if ENABLED(JOYSTICK)
2553
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2554
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2555
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2556
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2557
+
2558
+  // Use M119 to find reasonable values after connecting your hardware:
2559
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2560
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2561
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2562
+#endif
2563
+
2564
+/**
2553 2565
  * MAX7219 Debug Matrix
2554 2566
  *
2555 2567
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-10S/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-10_5S/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-10mini/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-20 Pro/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-20/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/CR-8/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/Ender-2/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/Ender-3/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/Ender-4/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Creality/Ender-5/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Dagoma/Disco Ultimate/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   #define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/EVNOVO (Artillery)/Sidewinder X1/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Einstart-S/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FYSETC/AIO_II/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FYSETC/Cheetah 1.2/BLTouch/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FYSETC/Cheetah 1.2/base/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FYSETC/Cheetah/BLTouch/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FYSETC/Cheetah/base/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FYSETC/F6_13/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Felix/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FlashForge/CreatorPro/Configuration_adv.h View File

@@ -2461,10 +2461,6 @@
2461 2461
   //#define HOST_PROMPT_SUPPORT
2462 2462
 #endif
2463 2463
 
2464
-//===========================================================================
2465
-//====================== I2C Position Encoder Settings ======================
2466
-//===========================================================================
2467
-
2468 2464
 /**
2469 2465
  * I2C position encoders for closed loop control.
2470 2466
  * Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
2546 2542
 #endif // I2C_POSITION_ENCODERS
2547 2543
 
2548 2544
 /**
2545
+ * Analog Joystick(s)
2546
+ */
2547
+//#define JOYSTICK
2548
+#if ENABLED(JOYSTICK)
2549
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2550
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2551
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2552
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2553
+
2554
+  // Use M119 to find reasonable values after connecting your hardware:
2555
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2556
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2557
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2558
+#endif
2559
+
2560
+/**
2549 2561
  * MAX7219 Debug Matrix
2550 2562
  *
2551 2563
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Formbot/Raptor/Configuration_adv.h View File

@@ -2466,10 +2466,6 @@
2466 2466
   //#define HOST_PROMPT_SUPPORT
2467 2467
 #endif
2468 2468
 
2469
-//===========================================================================
2470
-//====================== I2C Position Encoder Settings ======================
2471
-//===========================================================================
2472
-
2473 2469
 /**
2474 2470
  * I2C position encoders for closed loop control.
2475 2471
  * Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
2551 2547
 #endif // I2C_POSITION_ENCODERS
2552 2548
 
2553 2549
 /**
2550
+ * Analog Joystick(s)
2551
+ */
2552
+//#define JOYSTICK
2553
+#if ENABLED(JOYSTICK)
2554
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2555
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2556
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2557
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2558
+
2559
+  // Use M119 to find reasonable values after connecting your hardware:
2560
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2561
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2562
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2563
+#endif
2564
+
2565
+/**
2554 2566
  * MAX7219 Debug Matrix
2555 2567
  *
2556 2568
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Formbot/T_Rex_2+/Configuration_adv.h View File

@@ -2466,10 +2466,6 @@
2466 2466
   //#define HOST_PROMPT_SUPPORT
2467 2467
 #endif
2468 2468
 
2469
-//===========================================================================
2470
-//====================== I2C Position Encoder Settings ======================
2471
-//===========================================================================
2472
-
2473 2469
 /**
2474 2470
  * I2C position encoders for closed loop control.
2475 2471
  * Developed by Chris Barr at Aus3D.
@@ -2551,6 +2547,22 @@
2551 2547
 #endif // I2C_POSITION_ENCODERS
2552 2548
 
2553 2549
 /**
2550
+ * Analog Joystick(s)
2551
+ */
2552
+//#define JOYSTICK
2553
+#if ENABLED(JOYSTICK)
2554
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2555
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2556
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2557
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2558
+
2559
+  // Use M119 to find reasonable values after connecting your hardware:
2560
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2561
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2562
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2563
+#endif
2564
+
2565
+/**
2554 2566
  * MAX7219 Debug Matrix
2555 2567
  *
2556 2568
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Formbot/T_Rex_3/Configuration_adv.h View File

@@ -2461,10 +2461,6 @@
2461 2461
   //#define HOST_PROMPT_SUPPORT
2462 2462
 #endif
2463 2463
 
2464
-//===========================================================================
2465
-//====================== I2C Position Encoder Settings ======================
2466
-//===========================================================================
2467
-
2468 2464
 /**
2469 2465
  * I2C position encoders for closed loop control.
2470 2466
  * Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
2546 2542
 #endif // I2C_POSITION_ENCODERS
2547 2543
 
2548 2544
 /**
2545
+ * Analog Joystick(s)
2546
+ */
2547
+//#define JOYSTICK
2548
+#if ENABLED(JOYSTICK)
2549
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2550
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2551
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2552
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2553
+
2554
+  // Use M119 to find reasonable values after connecting your hardware:
2555
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2556
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2557
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2558
+#endif
2559
+
2560
+/**
2549 2561
  * MAX7219 Debug Matrix
2550 2562
  *
2551 2563
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Geeetech/A10/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Geeetech/A10M/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Geeetech/A20M/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Geeetech/MeCreator2/Configuration_adv.h View File

@@ -2461,10 +2461,6 @@
2461 2461
   //#define HOST_PROMPT_SUPPORT
2462 2462
 #endif
2463 2463
 
2464
-//===========================================================================
2465
-//====================== I2C Position Encoder Settings ======================
2466
-//===========================================================================
2467
-
2468 2464
 /**
2469 2465
  * I2C position encoders for closed loop control.
2470 2466
  * Developed by Chris Barr at Aus3D.
@@ -2546,6 +2542,22 @@
2546 2542
 #endif // I2C_POSITION_ENCODERS
2547 2543
 
2548 2544
 /**
2545
+ * Analog Joystick(s)
2546
+ */
2547
+//#define JOYSTICK
2548
+#if ENABLED(JOYSTICK)
2549
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2550
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2551
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2552
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2553
+
2554
+  // Use M119 to find reasonable values after connecting your hardware:
2555
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2556
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2557
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2558
+#endif
2559
+
2560
+/**
2549 2561
  * MAX7219 Debug Matrix
2550 2562
  *
2551 2563
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/HMS434/Configuration_adv.h View File

@@ -2384,10 +2384,6 @@
2384 2384
   //#define HOST_PROMPT_SUPPORT
2385 2385
 #endif
2386 2386
 
2387
-//===========================================================================
2388
-//====================== I2C Position Encoder Settings ======================
2389
-//===========================================================================
2390
-
2391 2387
 /**
2392 2388
  * I2C position encoders for closed loop control.
2393 2389
  * Developed by Chris Barr at Aus3D.
@@ -2469,6 +2465,22 @@
2469 2465
 #endif // I2C_POSITION_ENCODERS
2470 2466
 
2471 2467
 /**
2468
+ * Analog Joystick(s)
2469
+ */
2470
+//#define JOYSTICK
2471
+#if ENABLED(JOYSTICK)
2472
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2473
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2474
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2475
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2476
+
2477
+  // Use M119 to find reasonable values after connecting your hardware:
2478
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2479
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2480
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2481
+#endif
2482
+
2483
+/**
2472 2484
  * MAX7219 Debug Matrix
2473 2485
  *
2474 2486
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Infitary/i3-M508/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/JGAurora/A1/Configuration_adv.h View File

@@ -2467,10 +2467,6 @@
2467 2467
   //#define HOST_PROMPT_SUPPORT
2468 2468
 #endif
2469 2469
 
2470
-//===========================================================================
2471
-//====================== I2C Position Encoder Settings ======================
2472
-//===========================================================================
2473
-
2474 2470
 /**
2475 2471
  * I2C position encoders for closed loop control.
2476 2472
  * Developed by Chris Barr at Aus3D.
@@ -2552,6 +2548,22 @@
2552 2548
 #endif // I2C_POSITION_ENCODERS
2553 2549
 
2554 2550
 /**
2551
+ * Analog Joystick(s)
2552
+ */
2553
+//#define JOYSTICK
2554
+#if ENABLED(JOYSTICK)
2555
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2556
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2557
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2558
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2559
+
2560
+  // Use M119 to find reasonable values after connecting your hardware:
2561
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2562
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2563
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2564
+#endif
2565
+
2566
+/**
2555 2567
  * MAX7219 Debug Matrix
2556 2568
  *
2557 2569
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/JGAurora/A5/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/JGAurora/A5S/Configuration_adv.h View File

@@ -2467,10 +2467,6 @@
2467 2467
   //#define HOST_PROMPT_SUPPORT
2468 2468
 #endif
2469 2469
 
2470
-//===========================================================================
2471
-//====================== I2C Position Encoder Settings ======================
2472
-//===========================================================================
2473
-
2474 2470
 /**
2475 2471
  * I2C position encoders for closed loop control.
2476 2472
  * Developed by Chris Barr at Aus3D.
@@ -2552,6 +2548,22 @@
2552 2548
 #endif // I2C_POSITION_ENCODERS
2553 2549
 
2554 2550
 /**
2551
+ * Analog Joystick(s)
2552
+ */
2553
+//#define JOYSTICK
2554
+#if ENABLED(JOYSTICK)
2555
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2556
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2557
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2558
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2559
+
2560
+  // Use M119 to find reasonable values after connecting your hardware:
2561
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2562
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2563
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2564
+#endif
2565
+
2566
+/**
2555 2567
  * MAX7219 Debug Matrix
2556 2568
  *
2557 2569
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/MakerParts/Configuration_adv.h View File

@@ -2455,10 +2455,6 @@
2455 2455
   //#define HOST_PROMPT_SUPPORT
2456 2456
 #endif
2457 2457
 
2458
-//===========================================================================
2459
-//====================== I2C Position Encoder Settings ======================
2460
-//===========================================================================
2461
-
2462 2458
 /**
2463 2459
  * I2C position encoders for closed loop control.
2464 2460
  * Developed by Chris Barr at Aus3D.
@@ -2540,6 +2536,22 @@
2540 2536
 #endif // I2C_POSITION_ENCODERS
2541 2537
 
2542 2538
 /**
2539
+ * Analog Joystick(s)
2540
+ */
2541
+//#define JOYSTICK
2542
+#if ENABLED(JOYSTICK)
2543
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2544
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2545
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2546
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2547
+
2548
+  // Use M119 to find reasonable values after connecting your hardware:
2549
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2550
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2551
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2552
+#endif
2553
+
2554
+/**
2543 2555
  * MAX7219 Debug Matrix
2544 2556
  *
2545 2557
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Malyan/M150/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Malyan/M200/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Mks/Robin/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Mks/Sbase/Configuration_adv.h View File

@@ -2463,10 +2463,6 @@
2463 2463
   //#define HOST_PROMPT_SUPPORT
2464 2464
 #endif
2465 2465
 
2466
-//===========================================================================
2467
-//====================== I2C Position Encoder Settings ======================
2468
-//===========================================================================
2469
-
2470 2466
 /**
2471 2467
  * I2C position encoders for closed loop control.
2472 2468
  * Developed by Chris Barr at Aus3D.
@@ -2548,6 +2544,22 @@
2548 2544
 #endif // I2C_POSITION_ENCODERS
2549 2545
 
2550 2546
 /**
2547
+ * Analog Joystick(s)
2548
+ */
2549
+//#define JOYSTICK
2550
+#if ENABLED(JOYSTICK)
2551
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2552
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2553
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2554
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2555
+
2556
+  // Use M119 to find reasonable values after connecting your hardware:
2557
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2558
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2559
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2560
+#endif
2561
+
2562
+/**
2551 2563
  * MAX7219 Debug Matrix
2552 2564
  *
2553 2565
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/RapideLite/RL200/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/RigidBot/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/SCARA/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/STM32/Black_STM32F407VET6/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Sanguinololu/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Tevo/Michelangelo/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Tevo/Tarantula Pro/Configuration_adv.h View File

@@ -2458,10 +2458,6 @@
2458 2458
   //#define HOST_PROMPT_SUPPORT
2459 2459
 #endif
2460 2460
 
2461
-//===========================================================================
2462
-//====================== I2C Position Encoder Settings ======================
2463
-//===========================================================================
2464
-
2465 2461
 /**
2466 2462
  * I2C position encoders for closed loop control.
2467 2463
  * Developed by Chris Barr at Aus3D.
@@ -2543,6 +2539,22 @@
2543 2539
 #endif // I2C_POSITION_ENCODERS
2544 2540
 
2545 2541
 /**
2542
+ * Analog Joystick(s)
2543
+ */
2544
+//#define JOYSTICK
2545
+#if ENABLED(JOYSTICK)
2546
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2547
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2548
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2549
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2550
+
2551
+  // Use M119 to find reasonable values after connecting your hardware:
2552
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2553
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2554
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2555
+#endif
2556
+
2557
+/**
2546 2558
  * MAX7219 Debug Matrix
2547 2559
  *
2548 2560
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Tevo/Tornado/V1 (MKS Base)/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Tevo/Tornado/V2 (MKS GEN-L)/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/TheBorg/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/TinyBoy2/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Tronxy/X3A/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Tronxy/X5S-2E/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/UltiMachine/Archim1/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/UltiMachine/Archim2/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/VORONDesign/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Velleman/K8200/Configuration_adv.h View File

@@ -2475,10 +2475,6 @@
2475 2475
   //#define HOST_PROMPT_SUPPORT
2476 2476
 #endif
2477 2477
 
2478
-//===========================================================================
2479
-//====================== I2C Position Encoder Settings ======================
2480
-//===========================================================================
2481
-
2482 2478
 /**
2483 2479
  * I2C position encoders for closed loop control.
2484 2480
  * Developed by Chris Barr at Aus3D.
@@ -2560,6 +2556,22 @@
2560 2556
 #endif // I2C_POSITION_ENCODERS
2561 2557
 
2562 2558
 /**
2559
+ * Analog Joystick(s)
2560
+ */
2561
+//#define JOYSTICK
2562
+#if ENABLED(JOYSTICK)
2563
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2564
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2565
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2566
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2567
+
2568
+  // Use M119 to find reasonable values after connecting your hardware:
2569
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2570
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2571
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2572
+#endif
2573
+
2574
+/**
2563 2575
  * MAX7219 Debug Matrix
2564 2576
  *
2565 2577
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 16
- 4
config/examples/Velleman/K8400/Configuration_adv.h View File

@@ -2462,10 +2462,6 @@
2462 2462
   //#define HOST_PROMPT_SUPPORT
2463 2463
 #endif
2464 2464
 
2465
-//===========================================================================
2466
-//====================== I2C Position Encoder Settings ======================
2467
-//===========================================================================
2468
-
2469 2465
 /**
2470 2466
  * I2C position encoders for closed loop control.
2471 2467
  * Developed by Chris Barr at Aus3D.
@@ -2547,6 +2543,22 @@
2547 2543
 #endif // I2C_POSITION_ENCODERS
2548 2544
 
2549 2545
 /**
2546
+ * Analog Joystick(s)
2547
+ */
2548
+//#define JOYSTICK
2549
+#if ENABLED(JOYSTICK)
2550
+  #define JOY_X_PIN    5  // RAMPS: Suggested pin A5  on AUX2
2551
+  #define JOY_Y_PIN   10  // RAMPS: Suggested pin A10 on AUX2
2552
+  #define JOY_Z_PIN   12  // RAMPS: Suggested pin A12 on AUX2
2553
+  #define JOY_EN_PIN  44  // RAMPS: Suggested pin D44 on AUX2
2554
+
2555
+  // Use M119 to find reasonable values after connecting your hardware:
2556
+  #define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
2557
+  #define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
2558
+  #define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
2559
+#endif
2560
+
2561
+/**
2550 2562
  * MAX7219 Debug Matrix
2551 2563
  *
2552 2564
  * Add support for a low-cost 8x8 LED Matrix based on the Max7219 chip as a realtime status display.

+ 0
- 0
config/examples/WASP/PowerWASP/Configuration_adv.h View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save