From fcad16b2c78a0acf1f67c4bd1c80c8933f6d436c Mon Sep 17 00:00:00 2001 From: isaac879 Date: Mon, 17 Aug 2020 05:04:48 +0100 Subject: [PATCH] Add files via upload Switched the pan and slider stepper driver pins. --- .../panTiltMount.cpp | 22 +++++++++---------- .../panTiltMount.h | 19 +++++++++++----- .../pan_tilt_mount_nano_code_tmc2208.ino | 2 +- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/pan_tilt_mount_nano_code_tmc2208/panTiltMount.cpp b/pan_tilt_mount_nano_code_tmc2208/panTiltMount.cpp index 38b2085..97712da 100644 --- a/pan_tilt_mount_nano_code_tmc2208/panTiltMount.cpp +++ b/pan_tilt_mount_nano_code_tmc2208/panTiltMount.cpp @@ -75,17 +75,17 @@ void initPanTilt(void){ multi_stepper.addStepper(stepper_tilt); multi_stepper.addStepper(stepper_slider); digitalWrite(PIN_ENABLE, LOW); //Enable the stepper drivers - if(homing_mode == 1){ - printi(F("Homing\n")); - if(findHome()){ - printi(F("Complete\n")); - } - else{ - stepper_pan.setCurrentPosition(0); - stepper_tilt.setCurrentPosition(0); - printi(F("Error homing\n")); - } - } +// if(homing_mode == 1){ +// printi(F("Homing\n")); +// if(findHome()){ +// printi(F("Complete\n")); +// } +// else{ +// stepper_pan.setCurrentPosition(0); +// stepper_tilt.setCurrentPosition(0); +// printi(F("Error homing\n")); +// } +// } } /*--------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/pan_tilt_mount_nano_code_tmc2208/panTiltMount.h b/pan_tilt_mount_nano_code_tmc2208/panTiltMount.h index ca5705e..d1c9ba9 100644 --- a/pan_tilt_mount_nano_code_tmc2208/panTiltMount.h +++ b/pan_tilt_mount_nano_code_tmc2208/panTiltMount.h @@ -13,12 +13,21 @@ #define PIN_ENABLE 12 #define PIN_MS1 11 #define PIN_MS2 10 -#define PIN_STEP_SLIDER 8 -#define PIN_DIRECTION_SLIDER 7 + +//#define PIN_STEP_SLIDER 8 +//#define PIN_DIRECTION_SLIDER 7 +//#define PIN_STEP_TILT 6 +//#define PIN_DIRECTION_TILT 5 +//#define PIN_STEP_PAN 4 +//#define PIN_DIRECTION_PAN 3 + +#define PIN_STEP_SLIDER 4 +#define PIN_DIRECTION_SLIDER 3 #define PIN_STEP_TILT 6 #define PIN_DIRECTION_TILT 5 -#define PIN_STEP_PAN 4 -#define PIN_DIRECTION_PAN 3 +#define PIN_STEP_PAN 8 +#define PIN_DIRECTION_PAN 7 + #define PIN_SLIDER_HALL 2 #define HALF_STEP 2 @@ -102,7 +111,7 @@ #define NUM_LEDS 1 #define BRIGHTNESS 255 -#define VERSION_NUMBER "Version: 3.9.5\n" +#define VERSION_NUMBER "Version: 3.9.7\n" /*------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/pan_tilt_mount_nano_code_tmc2208/pan_tilt_mount_nano_code_tmc2208.ino b/pan_tilt_mount_nano_code_tmc2208/pan_tilt_mount_nano_code_tmc2208.ino index 6c0f9ed..3d63c15 100644 --- a/pan_tilt_mount_nano_code_tmc2208/pan_tilt_mount_nano_code_tmc2208.ino +++ b/pan_tilt_mount_nano_code_tmc2208/pan_tilt_mount_nano_code_tmc2208.ino @@ -18,7 +18,7 @@ * * Code written by isaac879 * - * Last modified: 06/08/2020 + * Last modified: 17/08/2020 * *--------------------------------------------------------------------------------------------------------------------------------------------------------*/