diff --git a/Sprinter/Configuration.h b/Sprinter/Configuration.h index 3d7a399..235bfbe 100644 --- a/Sprinter/Configuration.h +++ b/Sprinter/Configuration.h @@ -27,12 +27,12 @@ // 5 is ParCan supplied 104GT-2 100K // 6 is EPCOS 100k // 7 is 100k Honeywell thermistor 135-104LAG-J01 -#define THERMISTORHEATER 1 +#define THERMISTORHEATER 7 #define THERMISTORBED 1 //// Calibration variables // X, Y, Z, E steps per unit - Metric Prusa Mendel with Wade extruder: -#define _AXIS_STEP_PER_UNIT {80, 80, 3200/1.25,700} +#define _AXIS_STEP_PER_UNIT {80, 80, 4000,670} // Metric Prusa Mendel with Makergear geared stepper extruder: //#define _AXIS_STEP_PER_UNIT {80,80,3200/1.25,1380} // MakerGear Hybrid Prusa Mendel: @@ -54,7 +54,7 @@ const bool Z_ENDSTOP_INVERT = false; //#define BAUDRATE 250000 // Comment out (using // at the start of the line) to disable SD support: -#define SDSUPPORT +//#define SDSUPPORT // Uncomment to make run init.g from SD on boot //#define SDINITFILE @@ -139,9 +139,9 @@ const bool max_software_endstops = true; //If true, axis won't move to coordinat //----------------------------------------------------------------------- //Max Length for Prusa Mendel, check the ways of your axis and set this Values //----------------------------------------------------------------------- -const int X_MAX_LENGTH = 200; +const int X_MAX_LENGTH = 220; const int Y_MAX_LENGTH = 200; -const int Z_MAX_LENGTH = 100; +const int Z_MAX_LENGTH = 270; //----------------------------------------------------------------------- //// MOVEMENT SETTINGS diff --git a/Sprinter/Sprinter.pde b/Sprinter/Sprinter.pde index 6383f22..b07c10a 100644 --- a/Sprinter/Sprinter.pde +++ b/Sprinter/Sprinter.pde @@ -171,6 +171,7 @@ #define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli() #define CRITICAL_SECTION_END SREG = _sreg #endif //CRITICAL_SECTION_START +#define SERVO 1 void __cxa_pure_virtual(){}; @@ -377,6 +378,11 @@ unsigned long stepper_inactive_time = 0; //Temp Monitor for repetier unsigned char manage_monitor = 255; +#ifdef SERVO +#define SERVOCOUNT 4 +#include +static Servo servos[SERVOCOUNT]; +#endif //------------------------------------------------ //Init the SD card @@ -852,6 +858,18 @@ void setup() #endif +#ifdef SERVO +servos[0].attach(11); +servos[0].write(0); +servos[1].attach(6); +servos[1].write(180); +servos[2].attach(5); +servos[2].write(0); +servos[3].attach(4); +servos[3].write(180); +#endif + + #if defined(PID_SOFT_PWM) || (defined(FAN_SOFT_PWM) && (FAN_PIN > -1)) showString(PSTR("Soft PWM Init\r\n")); init_Timer2_softpwm(); @@ -1467,6 +1485,24 @@ FORCE_INLINE void process_commands() } } break; +#ifdef SERVO + case 43: + if (code_seen('S')) + { + int pin_status = code_value(); + if (code_seen('P') && pin_status >= 0 && pin_status <= 180) + { + + int pin_number = code_value(); + if (pin_number > -1 && pin_number