From 751b1ff3df98064ca2208e77d24df1b4eda32a83 Mon Sep 17 00:00:00 2001 From: Ximidar Date: Tue, 20 Feb 2018 17:58:38 -0800 Subject: [PATCH] Added initial configuration for Heated Bed on the C2 --- Marlin/Configuration.h | 33 +++++++++++++++++++++------------ Marlin/Marlin_main.cpp | 2 +- Marlin/boards.h | 1 + Marlin/pins_ROBOMB.h | 6 +++++- platformio.ini | 15 +++++++++++++-- 5 files changed, 41 insertions(+), 16 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 569d8b830034..7970e56ac947 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -123,10 +123,10 @@ #endif /* - * Options are R2, C2, or R2_DUAL + * Options are R2, C2, R2_DUAL, or C2_BED */ #ifndef ROBO_BOARD_VERSION - #define ROBO_BOARD_VERSION BOARD_VERSION_R2 + #define ROBO_BOARD_VERSION BOARD_VERSION_C2_BED #endif #ifndef ROBO_PRINTER @@ -136,7 +136,7 @@ // Optional custom name for your RepStrap or other custom machine // Displayed in the LCD "Ready" message // This block will also alter the DETAILED_BUILD_VERSION to display what board this is compiled for. (M115 will show this.) -#if RBV(C2) +#if RBV(C2) || RBV(C2_BED) #define CUSTOM_MACHINE_NAME " Robo C2" #define DETAILED_BUILD_VERSION SHORT_BUILD_VERSION CUSTOM_MACHINE_NAME #else @@ -160,7 +160,7 @@ #define EXTRUDERS 2 #endif -#if RBV(R2) || RBV(C2) +#if RBV(R2) || RBV(C2) || RBV(C2_BED) #define EXTRUDERS 1 #endif @@ -238,7 +238,7 @@ // The offset has to be X=0, Y=0 for the extruder 0 hotend (default extruder). // For the other hotends it is their distance from the extruder 0 hotend. -#if RBV(C2) || RBV(R2) +#if RBV(C2) || RBV(R2) || RBV(C2_BED) //#define HOTEND_OFFSET_X {0.0, 20.00} // (in mm) for each extruder, offset of the hotend on the X axis //#define HOTEND_OFFSET_Y {0.0, 5.00} // (in mm) for each extruder, offset of the hotend on the Y axis #elif RBV(R2_DUAL) @@ -344,6 +344,15 @@ #define TEMP_SENSOR_4 0 #define TEMP_SENSOR_BED 0 #endif + +#if RBV(C2_BED) + #define TEMP_SENSOR_0 1 + #define TEMP_SENSOR_1 0 + #define TEMP_SENSOR_2 0 + #define TEMP_SENSOR_3 0 + #define TEMP_SENSOR_4 0 + #define TEMP_SENSOR_BED 12 +#endif // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 #define DUMMY_THERMISTOR_999_VALUE 100 @@ -413,7 +422,7 @@ #endif // Robo C2 19V - #if RBV(C2) + #if RBV(C2) || RBV(C2_BED) #define DEFAULT_Kp 23.75 #define DEFAULT_Ki 1.48 #define DEFAULT_Kd 95.10 @@ -485,7 +494,7 @@ * details can be tuned in Configuration_adv.h */ -#if RBV(R2) || RBV(R2_DUAL) +#if RBV(R2) || RBV(R2_DUAL) || RBV(C2_BED) #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders #define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed #endif @@ -608,7 +617,7 @@ #endif #endif - #if RBV(C2) + #if RBV(C2) || RBV(C2_BED) #define DEFAULT_AXIS_STEPS_PER_UNIT { 80, 80, 800.00, 145.5 } #define DEFAULT_MAX_FEEDRATE { 300, 300, 12, 25 } #define DEFAULT_MAX_ACCELERATION { 3000, 3000, 100, 1000 } @@ -884,7 +893,7 @@ #define Z_MAX_POS 260 //Robo C2 -#elif RBV(C2) +#elif RBV(C2) || RBV(C2_BED) // The size of the print bed #define X_BED_SIZE 127 #define Y_BED_SIZE 127 @@ -1020,7 +1029,7 @@ #define FRONT_PROBE_BED_POSITION 30 #define BACK_PROBE_BED_POSITION 186 - #elif RBV(C2) + #elif RBV(C2) || RBV(C2_BED) // Set the number of grid points per dimension. #define GRID_MAX_POINTS_X 3 #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X @@ -1074,7 +1083,7 @@ #define ABL_PROBE_PT_2_Y 30 #define ABL_PROBE_PT_3_X 186 #define ABL_PROBE_PT_3_Y 30 - #elif RBV(C2) + #elif RBV(C2) || RBV(C2_BED) #define ABL_PROBE_PT_1_X 10 // Probing points for 3-Point leveling of the mesh #define ABL_PROBE_PT_1_Y 115 #define ABL_PROBE_PT_2_X 10 @@ -1107,7 +1116,7 @@ #define UBL_PROBE_PT_2_Y 30 #define UBL_PROBE_PT_3_X 186 #define UBL_PROBE_PT_3_Y 30 - #elif RBV(C2) + #elif RBV(C2) || RBV(C2_BED) #define UBL_PROBE_PT_1_X 10 // Probing points for 3-Point leveling of the mesh #define UBL_PROBE_PT_1_Y 115 #define UBL_PROBE_PT_2_X 10 diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 11ae66a6df65..11289cd779b5 100755 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5826,7 +5826,7 @@ void home_all_axes() { gcode_G28(true); } current_position[Y_AXIS] = LOGICAL_Y_POSITION(rny); //Just in case we want to have two different feed Rates / Positioning based on C2 or R2 - #if RBV(C2) + #if RBV(C2) || RBV(C2_BED) feedrate_mm_s = 125.00; //set feedrate to 125 #elif RBV(R2) || RBV(R2_DUAL) feedrate_mm_s = 125.00; //set feedrate to 125 diff --git a/Marlin/boards.h b/Marlin/boards.h index aff49b4833a2..2e8cd039ffef 100755 --- a/Marlin/boards.h +++ b/Marlin/boards.h @@ -105,6 +105,7 @@ #define BOARD_VERSION_R2 1 //Robo R2 #define BOARD_VERSION_C2 2 //Robo C2 #define BOARD_VERSION_R2_DUAL 3//Robo R2 with a Dual Extrusion Kit +#define BOARD_VERSION_C2_BED 4 //C2 with a heated Bed #define MB(board) (MOTHERBOARD==BOARD_##board) diff --git a/Marlin/pins_ROBOMB.h b/Marlin/pins_ROBOMB.h index 57f41242ba6f..36ef7d77c9c8 100644 --- a/Marlin/pins_ROBOMB.h +++ b/Marlin/pins_ROBOMB.h @@ -42,7 +42,11 @@ #endif #if RBV(R2_DUAL) #define IS_ROBOR2_DUAL - #define MACHINE_NAME "Robo R2 Dual" + #define MACHINE_NAME "Robo R2 Dual Extruder" +#endif +#if RBV(C2_BED) + #define IS_ROBOC2 + #define MACHINE_NAME "Robo C2 Heated Bed" #endif #define LARGE_FLASH true diff --git a/platformio.ini b/platformio.ini index f846d6369a10..e40cf7e63d5c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -16,7 +16,7 @@ src_dir = Marlin build_dir = Marlin_Build # Comment this out to build all environments. Or alternatively rename to the desired environment -env_default = R2 +#env_default = C2_BED [env:R2] @@ -47,8 +47,19 @@ framework = arduino board = megaatmega2560 board_f_cpu = 16000000L build_flags = - -D ROBO_BOARD_VERSION=BOARD_VERSION_C2 + -D ROBO_BOARD_VERSION=BOARD_VERSION_C2 -D ROBO_VERSION="Marlin_1.1.6_RoboVersion_1.2.4" -D ROBO_MODEL="C2" extra_scripts = extra_script.py +[env:C2_BED] +platform = atmelavr +framework = arduino +board = megaatmega2560 +board_f_cpu = 16000000L +build_flags = + -D ROBO_BOARD_VERSION=BOARD_VERSION_C2_BED + -D ROBO_VERSION="Marlin_1.1.6_RoboVersion_1.2.4" + -D ROBO_MODEL="C2_BED" +extra_scripts = extra_script.py +