Skip to content

Commit 62588d5

Browse files
committed
changed ms-pin definitions
1 parent 637a77b commit 62588d5

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

SphereBot Arduino/SphereBot/StepperModel.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,18 @@ StepperModel::StepperModel(int inDirPin, int inStepPin, int inEnablePin, int inE
4242
pinMode(dirPin, OUTPUT);
4343
pinMode(stepPin, OUTPUT);
4444
pinMode(enablePin, OUTPUT);
45-
pinMode(ms1Pin, OUTPUT);
46-
pinMode(ms2Pin, OUTPUT);
4745
if(endStopPin>=0)
48-
pinMode(endStopPin, INPUT);
46+
pinMode(endStopPin, INPUT);
47+
if((ms1Pin >=0) && (ms2Pin >=0))
48+
{
49+
pinMode(ms1Pin, OUTPUT);
50+
pinMode(ms2Pin, OUTPUT);
51+
digitalWrite(ms1Pin, vms1);
52+
digitalWrite(ms2Pin, vms2);
53+
}
4954

5055
digitalWrite(dirPin, LOW);
5156
digitalWrite(stepPin, LOW);
52-
53-
digitalWrite(ms1Pin, vms1);
54-
digitalWrite(ms2Pin, vms2);
5557

5658
currentStepcount=0;
5759
targetStepcount=0;

SphereBot Arduino/SphereBot/config.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
* PINS
33
*/
44

5+
//ms1 and ms2 are optional. You can simply make these settings by hardwiring the pins to high or low
6+
57
/* ms1 | ms2
68
----------------
79
L | L -> Full Step
@@ -18,16 +20,15 @@
1820
#define YAXIS_DIR_PIN 14
1921
#define YAXIS_STEP_PIN 15
2022
#define YAXIS_ENABLE_PIN 21
21-
#define YAXIS_MS1_PIN 19 //don´t make this connection!! ADC6 and ADC7 can not be used as a digital pin ( I made the pull up connection manually)
22-
#define YAXIS_MS2_PIN 28
23-
//#define YAXIS_MS3_PIN 18
23+
#define YAXIS_MS1_PIN -1 //ADC6 and ADC7 can not be used as a digital pin ( I made the pull up connection manually)
24+
#define YAXIS_MS2_PIN -1
2425
#define YAXIS_ENDSTOP_PIN -1 //13
2526

2627
#define XAXIS_DIR_PIN 10
2728
#define XAXIS_STEP_PIN 8
2829
#define XAXIS_ENABLE_PIN 2
29-
#define XAXIS_MS1_PIN 3
30-
#define XAXIS_MS2_PIN 4
30+
#define XAXIS_MS1_PIN -1
31+
#define XAXIS_MS2_PIN -1
3132
#define XAXIS_ENDSTOP_PIN -1 // <0 0> No Endstop!
3233

3334
#define SERVO_PIN 13
@@ -37,8 +38,8 @@
3738
*/
3839

3940
#define DEFAULT_PEN_UP_POSITION 35
40-
#define XAXIS_MIN_STEPCOUNT -5.6*230000
41-
#define XAXIS_MAX_STEPCOUNT 5*230000
41+
#define XAXIS_MIN_STEPCOUNT -5.6*230000 //max and min Values are not used by the firmware right now
42+
#define XAXIS_MAX_STEPCOUNT 5*230000 //
4243
#define DEFAULT_ZOOM_FACTOR 0.1808 // With a Zoom-Faktor of .65, I can print gcode for Makerbot Unicorn without changes.
4344
// The zoom factor can be also manipulated by the propretiary code M402
4445

0 commit comments

Comments
 (0)