diff --git a/SphereBot Arduino/SphereBot/SphereBot.ino b/SphereBot Arduino/SphereBot/SphereBot.ino index af838af..6a6fd06 100644 --- a/SphereBot Arduino/SphereBot/SphereBot.ino +++ b/SphereBot Arduino/SphereBot/SphereBot.ino @@ -33,57 +33,12 @@ #include "TimerOne.h" #include "SoftwareServo.h" #include "StepperModel.h" +#include "config.h" #define TIMER_DELAY 1024 #define VERSIONCODE "Spherebot 2.0" -/* - * PINS - */ - - /* ms1 | ms2 - ---------------- - L | L -> Full Step - H | L -> Half Step - L | H -> Quarter Step - H | H -> Sixteenth Step - */ - -#define XAXIS_VMS1 HIGH -#define XAXIS_VMS2 HIGH -#define YAXIS_VMS1 HIGH -#define YAXIS_VMS2 HIGH - -#define YAXIS_DIR_PIN 14 -#define YAXIS_STEP_PIN 15 -#define YAXIS_ENABLE_PIN 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) -#define YAXIS_MS2_PIN 28 -//#define YAXIS_MS3_PIN 18 -#define YAXIS_ENDSTOP_PIN -1 //13 - -#define XAXIS_DIR_PIN 10 -#define XAXIS_STEP_PIN 8 -#define XAXIS_ENABLE_PIN 2 -#define XAXIS_MS1_PIN 3 -#define XAXIS_MS2_PIN 4 -#define XAXIS_ENDSTOP_PIN -1 // <0 0> No Endstop! - -#define SERVO_PIN 13 - -/* - * Other Configuration - */ - -#define DEFAULT_PEN_UP_POSITION 35 -#define XAXIS_MIN_STEPCOUNT -5.6*230000 -#define XAXIS_MAX_STEPCOUNT 5*230000 -#define DEFAULT_ZOOM_FACTOR 0.1808 // With a Zoom-Faktor of .65, I can print gcode for Makerbot Unicorn without changes. - // The zoom factor can be also manipulated by the propretiary code M402 - - -/* --------- */ StepperModel xAxisStepper(XAXIS_DIR_PIN, XAXIS_STEP_PIN, XAXIS_ENABLE_PIN, XAXIS_ENDSTOP_PIN, XAXIS_MS1_PIN, XAXIS_MS2_PIN, XAXIS_VMS1, XAXIS_VMS2, XAXIS_MIN_STEPCOUNT, XAXIS_MAX_STEPCOUNT, 200.0, 16); diff --git a/SphereBot Arduino/SphereBot/config.h b/SphereBot Arduino/SphereBot/config.h new file mode 100644 index 0000000..52a09d7 --- /dev/null +++ b/SphereBot Arduino/SphereBot/config.h @@ -0,0 +1,44 @@ +/* + * PINS + */ + + /* ms1 | ms2 + ---------------- + L | L -> Full Step + H | L -> Half Step + L | H -> Quarter Step + H | H -> Sixteenth Step + */ + +#define XAXIS_VMS1 HIGH +#define XAXIS_VMS2 HIGH +#define YAXIS_VMS1 HIGH +#define YAXIS_VMS2 HIGH + +#define YAXIS_DIR_PIN 14 +#define YAXIS_STEP_PIN 15 +#define YAXIS_ENABLE_PIN 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) +#define YAXIS_MS2_PIN 28 +//#define YAXIS_MS3_PIN 18 +#define YAXIS_ENDSTOP_PIN -1 //13 + +#define XAXIS_DIR_PIN 10 +#define XAXIS_STEP_PIN 8 +#define XAXIS_ENABLE_PIN 2 +#define XAXIS_MS1_PIN 3 +#define XAXIS_MS2_PIN 4 +#define XAXIS_ENDSTOP_PIN -1 // <0 0> No Endstop! + +#define SERVO_PIN 13 + +/* + * Other Configuration + */ + +#define DEFAULT_PEN_UP_POSITION 35 +#define XAXIS_MIN_STEPCOUNT -5.6*230000 +#define XAXIS_MAX_STEPCOUNT 5*230000 +#define DEFAULT_ZOOM_FACTOR 0.1808 // With a Zoom-Faktor of .65, I can print gcode for Makerbot Unicorn without changes. + // The zoom factor can be also manipulated by the propretiary code M402 +