Ramps 1.6, Marlin and ardino joysticks

Hi all,
I wanted to share with you my analog scheme for ardino joysticks.
The board is Ramps 1.6 plus I connected two Ardino joysticks according to the following scheme. I also added an on/off button so that there are no accidents during operation.


It is possible to use free Y on the second joystick for the fourth axis, but this is above my level.
Here you can see how it works:

I used the Marlin firmware - V1CNC_Ramps-2.0.9.2, here are the joystick settings.
/**

  • Analog Joystick(s)
    */
    #define JOYSTICK
    #if ENABLED(JOYSTICK)
    #define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
    #define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
    #define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
    #define JOY_EN_PIN 42 // RAMPS: Suggested pin D44 on AUX2

//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 0,8191-100,8191+100, 16383 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 0,8191-100,8191+100, 16383 }
#define JOY_Z_LIMITS { 0,8191-100,8191+100, 16383 }
#define JOYSTICK_DEBUG
#endif

I hope the information is useful for you.

7 Likes

Remarking so i can find if i get the bug to do this. That would be super useful