From aee0ea80034db1abed27d14dfcb2421ea0387fa0 Mon Sep 17 00:00:00 2001 From: Johnny Russell Date: Thu, 2 Jun 2011 15:33:00 -0500 Subject: added RAMPS 1.3 pins --- Tonokip_Firmware/pins.h | 57 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 49 insertions(+), 8 deletions(-) (limited to 'Tonokip_Firmware') diff --git a/Tonokip_Firmware/pins.h b/Tonokip_Firmware/pins.h index 42845fd..7a2766f 100644 --- a/Tonokip_Firmware/pins.h +++ b/Tonokip_Firmware/pins.h @@ -206,11 +206,55 @@ #endif #endif +// uncomment one of the following lines for RAMPS v1.3 or v1.0, comment both for v1.2 or 1.1 +// #define RAMPS_V_1_3 +// #define RAMPS_V_1_0 + + +#ifdef RAMPS_V_1_3 + +#define X_STEP_PIN 54 +#define X_DIR_PIN 55 +#define X_ENABLE_PIN 38 +#define X_MIN_PIN 3 +#define X_MAX_PIN 2 + +#define Y_STEP_PIN 60 +#define Y_DIR_PIN 61 +#define Y_ENABLE_PIN 56 +#define Y_MIN_PIN 14 +#define Y_MAX_PIN 15 + +#define Z_STEP_PIN 46 +#define Z_DIR_PIN 48 +#define Z_ENABLE_PIN 62 +#define Z_MIN_PIN 18 +#define Z_MAX_PIN 19 + +#define E_STEP_PIN 26 +#define E_DIR_PIN 28 +#define E_ENABLE_PIN 24 + +#define SDPOWER -1 +#define SDSS 53 +#define LED_PIN 13 +#define FAN_PIN 9 +#define PS_ON_PIN 12 +#define KILL_PIN -1 + +#define HEATER_0_PIN 10 +#define HEATER_1_PIN 8 +#define TEMP_0_PIN 13 // ANALOG NUMBERING +#define TEMP_1_PIN 14 // ANALOG NUMBERING + + +#else // RAMPS_V_1_1 or RAMPS_V_1_2 as default + #define X_STEP_PIN 26 #define X_DIR_PIN 28 #define X_ENABLE_PIN 24 #define X_MIN_PIN 3 -#define X_MAX_PIN -2 //2 +#define X_MAX_PIN -1 //2 #define Y_STEP_PIN 38 #define Y_DIR_PIN 40 @@ -231,28 +275,25 @@ #define SDPOWER 48 #define SDSS 53 #define LED_PIN 13 - #define PS_ON_PIN -1 #define KILL_PIN -1 -// uncomment the following line for RAMPS V1.0 -// #define RAMPS_V_1_0 -#ifdef RAMPS_V_1_0 + +#ifdef RAMPS_V_1_0 // RAMPS_V_1_0 #define HEATER_0_PIN 12 // RAMPS 1.0 #define HEATER_1_PIN -1 // RAMPS 1.0 - #define FAN_PIN 11 // RAMPS 1.0 -#else // RAMPS_V_1_1 as default +#else // RAMPS_V_1_1 or RAMPS_V_1_2 #define HEATER_0_PIN 10 // RAMPS 1.1 #define HEATER_1_PIN 8 // RAMPS 1.1 - #define FAN_PIN 9 // RAMPS 1.1 #endif #define TEMP_0_PIN 2 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! #define TEMP_1_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! +#endif // SPI for Max6675 Thermocouple -- cgit v1.2.1 From 62f03b03046d283d250efad2bbaeaab63ee05580 Mon Sep 17 00:00:00 2001 From: kliment Date: Sat, 11 Jun 2011 19:37:13 +0200 Subject: Add SD support so Sanguinololu --- Tonokip_Firmware/pins.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Tonokip_Firmware') diff --git a/Tonokip_Firmware/pins.h b/Tonokip_Firmware/pins.h index 42845fd..fe5f1f7 100644 --- a/Tonokip_Firmware/pins.h +++ b/Tonokip_Firmware/pins.h @@ -409,6 +409,8 @@ #define TEMP_0_PIN 7 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 33 extruder) #define TEMP_1_PIN 6 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed) +#define SDPOWER -1 +#define SDSS 31 #else -- cgit v1.2.1 From 38cb99420a4463e0de3423b7998b6e6372a12153 Mon Sep 17 00:00:00 2001 From: kliment Date: Tue, 14 Jun 2011 09:37:28 +0200 Subject: Single line response to M105 --- Tonokip_Firmware/Tonokip_Firmware.pde | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Tonokip_Firmware') diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index e193265..ce670ca 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/Tonokip_Firmware/Tonokip_Firmware.pde @@ -669,14 +669,13 @@ inline void process_commands() bt = analog2tempBed(current_bed_raw); #endif #if (TEMP_0_PIN > -1) || defined (HEATER_USES_MAX6675) - Serial.print("T:"); - Serial.println(tt); - #if TEMP_1_PIN > -1 - Serial.print("ok T:"); Serial.print(tt); + #if TEMP_1_PIN > -1 Serial.print(" B:"); Serial.println(bt); + #else + Serial.println(); #endif #else Serial.println("No thermistors - no temp"); -- cgit v1.2.1 From 5d8e951ed899674ddea7994466489a02e89f9db8 Mon Sep 17 00:00:00 2001 From: johnnyr Date: Tue, 14 Jun 2011 18:33:46 -0700 Subject: Set RAMPS 1.3 Max endstop pins -1 for default config --- Tonokip_Firmware/pins.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Tonokip_Firmware') diff --git a/Tonokip_Firmware/pins.h b/Tonokip_Firmware/pins.h index 7a2766f..3b15ae2 100644 --- a/Tonokip_Firmware/pins.h +++ b/Tonokip_Firmware/pins.h @@ -217,19 +217,19 @@ #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 #define X_MIN_PIN 3 -#define X_MAX_PIN 2 +#define X_MAX_PIN -1 //2 //Max endstops default to disabled "-1", set to commented value to enable. #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 #define Y_ENABLE_PIN 56 #define Y_MIN_PIN 14 -#define Y_MAX_PIN 15 +#define Y_MAX_PIN -1 //15 #define Z_STEP_PIN 46 #define Z_DIR_PIN 48 #define Z_ENABLE_PIN 62 #define Z_MIN_PIN 18 -#define Z_MAX_PIN 19 +#define Z_MAX_PIN -1 //19 #define E_STEP_PIN 26 #define E_DIR_PIN 28 -- cgit v1.2.1 From c9598f60ad8e9ce943bba5af80d6d4f997c7250d Mon Sep 17 00:00:00 2001 From: Sam Ward Date: Tue, 21 Jun 2011 21:44:38 +0800 Subject: Added support for G28 to home specific axis, or all axis if none specified. i.e. G28 will home all G28 X will home only the X axis G28 Y Z will home the Y and Z axis --- Tonokip_Firmware/Tonokip_Firmware.pde | 108 ++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 50 deletions(-) (limited to 'Tonokip_Firmware') diff --git a/Tonokip_Firmware/Tonokip_Firmware.pde b/Tonokip_Firmware/Tonokip_Firmware.pde index ce670ca..fc49da1 100644 --- a/Tonokip_Firmware/Tonokip_Firmware.pde +++ b/Tonokip_Firmware/Tonokip_Firmware.pde @@ -85,6 +85,7 @@ float destination_x = 0.0, destination_y = 0.0, destination_z = 0.0, destination float current_x = 0.0, current_y = 0.0, current_z = 0.0, current_e = 0.0; long x_interval, y_interval, z_interval, e_interval; // for speed delay float feedrate = 1500, next_feedrate, z_feedrate, saved_feedrate; +bool home_all_axis = true; float time_for_move; long gcode_N, gcode_LastN; bool relative_mode = false; //Determines Absolute or Relative Coordinates @@ -477,60 +478,67 @@ inline void process_commands() destination_e = 0; current_e = 0; feedrate = 0; - - - if((X_MIN_PIN > -1 && X_HOME_DIR==-1) || (X_MAX_PIN > -1 && X_HOME_DIR==1)) { - current_x = 0; - destination_x = 1.5 * X_MAX_LENGTH * X_HOME_DIR; - feedrate = min_units_per_second * 60; - prepare_move(); - - current_x = 0; - destination_x = -1 * X_HOME_DIR; - prepare_move(); - - destination_x = 10 * X_HOME_DIR; - prepare_move(); - - current_x = 0; - destination_x = 0; - feedrate = 0; + + home_all_axis = !((code_seen('X')) || (code_seen('Y')) || (code_seen('Z'))); + + if((home_all_axis) || (code_seen('X'))) { + if((X_MIN_PIN > -1 && X_HOME_DIR==-1) || (X_MAX_PIN > -1 && X_HOME_DIR==1)) { + current_x = 0; + destination_x = 1.5 * X_MAX_LENGTH * X_HOME_DIR; + feedrate = min_units_per_second * 60; + prepare_move(); + + current_x = 0; + destination_x = -1 * X_HOME_DIR; + prepare_move(); + + destination_x = 10 * X_HOME_DIR; + prepare_move(); + + current_x = 0; + destination_x = 0; + feedrate = 0; + } } - if((Y_MIN_PIN > -1 && Y_HOME_DIR==-1) || (Y_MAX_PIN > -1 && Y_HOME_DIR==1)) { - current_y = 0; - destination_y = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR; - feedrate = min_units_per_second * 60; - prepare_move(); - - current_y = 0; - destination_y = -1 * Y_HOME_DIR; - prepare_move(); - - destination_y = 10 * Y_HOME_DIR; - prepare_move(); - - current_y = 0; - destination_y = 0; - feedrate = 0; + if((home_all_axis) || (code_seen('Y'))) { + if((Y_MIN_PIN > -1 && Y_HOME_DIR==-1) || (Y_MAX_PIN > -1 && Y_HOME_DIR==1)) { + current_y = 0; + destination_y = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR; + feedrate = min_units_per_second * 60; + prepare_move(); + + current_y = 0; + destination_y = -1 * Y_HOME_DIR; + prepare_move(); + + destination_y = 10 * Y_HOME_DIR; + prepare_move(); + + current_y = 0; + destination_y = 0; + feedrate = 0; + } } - if((Z_MIN_PIN > -1 && Z_HOME_DIR==-1) || (Z_MAX_PIN > -1 && Z_HOME_DIR==1)) { - current_z = 0; - destination_z = 1.5 * Z_MAX_LENGTH * Z_HOME_DIR; - feedrate = max_z_feedrate/2; - prepare_move(); - - current_z = 0; - destination_z = -1 * Z_HOME_DIR; - prepare_move(); - - destination_z = 10 * Z_HOME_DIR; - prepare_move(); - - current_z = 0; - destination_z = 0; - feedrate = 0; + if((home_all_axis) || (code_seen('Z'))) { + if((Z_MIN_PIN > -1 && Z_HOME_DIR==-1) || (Z_MAX_PIN > -1 && Z_HOME_DIR==1)) { + current_z = 0; + destination_z = 1.5 * Z_MAX_LENGTH * Z_HOME_DIR; + feedrate = max_z_feedrate/2; + prepare_move(); + + current_z = 0; + destination_z = -1 * Z_HOME_DIR; + prepare_move(); + + destination_z = 10 * Z_HOME_DIR; + prepare_move(); + + current_z = 0; + destination_z = 0; + feedrate = 0; + } } feedrate = saved_feedrate; -- cgit v1.2.1