#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
#define DEFAULT_MAX_ACCELERATION {9000,9000,100,10000} // X, Y, Z, E maximum start speed for accelerated moves. E default values are good for skeinforge 40+, for older versions raise them a lot.
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for printing moves
#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
#define DEFAULT_RETRACT_ACCELERATION 3000 // X, Y, Z and E max acceleration in mm/s^2 for r retracts
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
// Offset of the extruders (uncomment if using more than one and relying on firmware to position when changing).
@ -307,7 +310,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
// EEPROM
// EEPROM
// the microcontroller can store settings in the EEPROM, e.g. max velocity...
// the microcontroller can store settings in the EEPROM, e.g. max velocity...
// M500 - stores paramters in EEPROM
// M500 - stores paramters in EEPROM
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
// M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
//define this to enable eeprom support
//define this to enable eeprom support
//#define EEPROM_SETTINGS
//#define EEPROM_SETTINGS
@ -315,9 +318,18 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
// please keep turned on if you can.
// please keep turned on if you can.
//#define EEPROM_CHITCHAT
//#define EEPROM_CHITCHAT
// Preheat Constants
#define PLA_PREHEAT_HOTEND_TEMP 180
#define PLA_PREHEAT_HPB_TEMP 70
#define PLA_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255
#define ABS_PREHEAT_HOTEND_TEMP 240
#define ABS_PREHEAT_HPB_TEMP 100
#define ABS_PREHEAT_FAN_SPEED 255 // Insert Value between 0 and 255
//LCD and SD support
//LCD and SD support
//#define ULTRA_LCD //general lcd support, also 16x2
//#define ULTRA_LCD //general lcd support, also 16x2
//#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
//#define DOGLCD// Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family)
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
//#define SDSUPPORT // Enable SD Card Support in Hardware Console
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
//#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error)
@ -353,43 +365,74 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
#define ENDSTOPS_ONLY_FOR_HOMING // If defined the endstops will only be used for homing
@ -210,9 +220,9 @@
// However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
// However, THIS FEATURE IS UNSAFE!, as it will only work if interrupts are disabled. And the code could hang in an interrupt routine with interrupts disabled.
//#define WATCHDOG_RESET_MANUAL
//#define WATCHDOG_RESET_MANUAL
#endif
#endif
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
// Enable the option to stop SD printing when hitting and endstops, needs to be enabled from the LCD menu when this option is enabled.
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
//#define ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
// extruder advance constant (s2/mm3)
// extruder advance constant (s2/mm3)
//
//
@ -276,7 +286,7 @@ const unsigned int dropsegments=5; //everything with less than this number of st
case208:// M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
case208:// M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
{
{
if(code_seen('S'))
if(code_seen('S'))
{
{
retract_recover_length=code_value();
retract_recover_length=code_value();
}
}
if(code_seen('F'))
if(code_seen('F'))
{
{
retract_recover_feedrate=code_value();
retract_recover_feedrate=code_value();
}
}
}break;
}break;
case209:// M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
case209:// M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
#define BTN_EN1 11 //must be a hardware interrupt pin
#define BTN_EN1 11
#define BTN_EN2 10 //must be hardware interrupt pin
#define BTN_EN2 10
#define BTN_ENC 16 //the switch
#define BTN_ENC 16 //the switch
//not connected to a pin
//not connected to a pin
#define SDCARDDETECT -1
#define SDCARDDETECT -1
//from the same bit in the RAMPS Newpanel define
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#endif //Newpanel
#endif //Newpanel
#endif //Ultipanel
#endif //Ultipanel
#endif
#endif
@ -823,17 +771,17 @@
#define Y_MAX_PIN 28
#define Y_MAX_PIN 28
#define Y_ENABLE_PIN 29
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 37
#define Z_STEP_PIN 37
#define Z_DIR_PIN 39
#define Z_DIR_PIN 39
#define Z_MIN_PIN 30
#define Z_MIN_PIN 30
#define Z_MAX_PIN 32
#define Z_MAX_PIN 32
#define Z_ENABLE_PIN 35
#define Z_ENABLE_PIN 35
#define HEATER_BED_PIN 4
#define HEATER_BED_PIN 4
#define TEMP_BED_PIN 10
#define TEMP_BED_PIN 10
#define HEATER_0_PIN 2
#define HEATER_0_PIN 2
#define TEMP_0_PIN 8
#define TEMP_0_PIN 8
#define HEATER_1_PIN 3
#define HEATER_1_PIN 3
#define TEMP_1_PIN 9
#define TEMP_1_PIN 9
@ -863,29 +811,20 @@
//arduino pin witch triggers an piezzo beeper
//arduino pin witch triggers an piezzo beeper
#define BEEPER 18
#define BEEPER 18
#define LCD_PINS_RS 20
#define LCD_PINS_RS 20
#define LCD_PINS_ENABLE 17
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 16
#define LCD_PINS_D4 16
#define LCD_PINS_D5 21
#define LCD_PINS_D5 21
#define LCD_PINS_D6 5
#define LCD_PINS_D6 5
#define LCD_PINS_D7 6
#define LCD_PINS_D7 6
//buttons are directly attached
//buttons are directly attached
#define BTN_EN1 40
#define BTN_EN1 40
#define BTN_EN2 42
#define BTN_EN2 42
#define BTN_ENC 19 //the click
#define BTN_ENC 19 //the click
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define SDCARDDETECT 38
#define SDCARDDETECT 38
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#else //old style panel with shift register
#else //old style panel with shift register
//arduino pin witch triggers an piezzo beeper
//arduino pin witch triggers an piezzo beeper
#define BEEPER 18
#define BEEPER 18
@ -895,40 +834,15 @@
#define SHIFT_LD 42
#define SHIFT_LD 42
#define SHIFT_OUT 40
#define SHIFT_OUT 40
#define SHIFT_EN 17
#define SHIFT_EN 17
#define LCD_PINS_RS 16
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 5
#define LCD_PINS_ENABLE 5
#define LCD_PINS_D4 6
#define LCD_PINS_D4 6
#define LCD_PINS_D5 21
#define LCD_PINS_D5 21
#define LCD_PINS_D6 20
#define LCD_PINS_D6 20
#define LCD_PINS_D7 19
#define LCD_PINS_D7 19
//encoder rotation values
#ifndef ULTIMAKERCONTROLLER
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#else
#define encrot0 0
#define encrot1 1
#define encrot2 3
#define encrot3 2
#endif
#define SDCARDDETECT -1
#define SDCARDDETECT -1
//bits in the shift register that carry the buttons for:
// left up center down right red
#define BL_LE 7
#define BL_UP 6
#define BL_MI 5
#define BL_DW 4
#define BL_RI 3
#define BL_ST 2
#define BLEN_B 1
#define BLEN_A 0
#endif
#endif
#endif //ULTRA_LCD
#endif //ULTRA_LCD
@ -960,17 +874,17 @@
#define Y_MAX_PIN 16
#define Y_MAX_PIN 16
#define Y_ENABLE_PIN 29
#define Y_ENABLE_PIN 29
#define Z_STEP_PIN 37
#define Z_STEP_PIN 37
#define Z_DIR_PIN 39
#define Z_DIR_PIN 39
#define Z_MIN_PIN 19
#define Z_MIN_PIN 19
#define Z_MAX_PIN 18
#define Z_MAX_PIN 18
#define Z_ENABLE_PIN 35
#define Z_ENABLE_PIN 35
#define HEATER_BED_PIN -1
#define HEATER_BED_PIN -1
#define TEMP_BED_PIN -1
#define TEMP_BED_PIN -1
#define HEATER_0_PIN 2
#define HEATER_0_PIN 2
#define TEMP_0_PIN 8
#define TEMP_0_PIN 8
#define HEATER_1_PIN 1
#define HEATER_1_PIN 1
#define TEMP_1_PIN 1
#define TEMP_1_PIN 1
@ -994,10 +908,10 @@
#define KILL_PIN -1
#define KILL_PIN -1
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#define LCD_PINS_RS 24
#define LCD_PINS_RS 24
#define LCD_PINS_ENABLE 22
#define LCD_PINS_ENABLE 22
#define LCD_PINS_D4 36
#define LCD_PINS_D4 36
#define LCD_PINS_D5 34
#define LCD_PINS_D5 34
#define LCD_PINS_D6 32
#define LCD_PINS_D6 32
#define LCD_PINS_D7 30
#define LCD_PINS_D7 30
@ -1019,17 +933,17 @@
#define X_DIR_PIN 16
#define X_DIR_PIN 16
#define X_ENABLE_PIN 48
#define X_ENABLE_PIN 48
#define X_MIN_PIN 37
#define X_MIN_PIN 37
#define X_MAX_PIN 36
#define X_MAX_PIN 36
#define Y_STEP_PIN 54
#define Y_STEP_PIN 54
#define Y_DIR_PIN 47
#define Y_DIR_PIN 47
#define Y_ENABLE_PIN 55
#define Y_ENABLE_PIN 55
#define Y_MIN_PIN 35
#define Y_MIN_PIN 35
#define Y_MAX_PIN 34
#define Y_MAX_PIN 34
#define Z_STEP_PIN 57
#define Z_STEP_PIN 57
#define Z_DIR_PIN 56
#define Z_DIR_PIN 56
#define Z_ENABLE_PIN 62
#define Z_ENABLE_PIN 62
#define Z_MIN_PIN 33
#define Z_MIN_PIN 33
#define Z_MAX_PIN 32
#define Z_MAX_PIN 32
@ -1047,45 +961,76 @@
#define LED_PIN 13
#define LED_PIN 13
#define FAN_PIN 7
#define FAN_PIN 7
//additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
//additional FAN1 PIN (e.g. useful for electronics fan or light on/off) on PIN 8
#define PS_ON_PIN 45
#define PS_ON_PIN 45
#define KILL_PIN 46
#define KILL_PIN 46
#define HEATER_0_PIN 2 // EXTRUDER 1
#if (TEMP_SENSOR_0==0)
#define HEATER_1_PIN 3 // EXTRUDER 2
#define TEMP_0_PIN -1
#define HEATER_2_PIN 6 // EXTRUDER 3
#define HEATER_0_PIN -1
#else
#define HEATER_0_PIN 2 // EXTRUDER 1
#if (TEMP_SENSOR_0==-1)
#define TEMP_0_PIN 6 // ANALOG NUMBERING - connector *K1* on RUMBA thermocouple ADD ON is used
#else
#define TEMP_0_PIN 15 // ANALOG NUMBERING - default connector for thermistor *T0* on rumba board is used
#endif
#endif
#if (TEMP_SENSOR_1==0)
#define TEMP_1_PIN -1
#define HEATER_1_PIN -1
#else
#define HEATER_1_PIN 3 // EXTRUDER 2
#if (TEMP_SENSOR_1==-1)
#define TEMP_1_PIN 5 // ANALOG NUMBERING - connector *K2* on RUMBA thermocouple ADD ON is used
#else
#define TEMP_1_PIN 14 // ANALOG NUMBERING - default connector for thermistor *T1* on rumba board is used
#endif
#endif
#if (TEMP_SENSOR_2==0)
#define TEMP_2_PIN -1
#define HEATER_2_PIN -1
#else
#define HEATER_2_PIN 6 // EXTRUDER 3
#if (TEMP_SENSOR_2==-1)
#define TEMP_2_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_BED is defined as thermocouple
#else
#define TEMP_2_PIN 13 // ANALOG NUMBERING - default connector for thermistor *T2* on rumba board is used
#endif
#endif
//optional for extruder 4 or chamber: #define TEMP_X_PIN 12 // ANALOG NUMBERING - default connector for thermistor *T3* on rumba board is used
//optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
//optional FAN1 can be used as 4th heater output: #define HEATER_3_PIN 8 // EXTRUDER 4
#define HEATER_BED_PIN 9 // BED
#define TEMP_0_PIN 15 // ANALOG NUMBERING
#if (TEMP_SENSOR_BED==0)
#define TEMP_1_PIN 14 // ANALOG NUMBERING
#define TEMP_BED_PIN -1
#define TEMP_2_PIN 13 // ANALOG NUMBERING
#define HEATER_BED_PIN -1
//optional for extruder 4 or chamber: #define TEMP_2_PIN 12 // ANALOG NUMBERING
#else
#define TEMP_BED_PIN 11 // ANALOG NUMBERING
#define HEATER_BED_PIN 9 // BED
#if (TEMP_SENSOR_BED==-1)
#define TEMP_BED_PIN 7 // ANALOG NUMBERING - connector *K3* on RUMBA thermocouple ADD ON is used <-- this can not be used when TEMP_SENSOR_2 is defined as thermocouple
#else
#define TEMP_BED_PIN 11 // ANALOG NUMBERING - default connector for thermistor *THB* on rumba board is used
#endif
#endif
#define SDPOWER -1
#define SDPOWER -1
#define SDSS 53
#define SDSS 53
#define SDCARDDETECT 49
#define SDCARDDETECT 49
#define BEEPER 44
#define BEEPER 44
#define LCD_PINS_RS 19
#define LCD_PINS_RS 19
#define LCD_PINS_ENABLE 42
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 18
#define LCD_PINS_D4 18
#define LCD_PINS_D5 38
#define LCD_PINS_D5 38
#define LCD_PINS_D6 41
#define LCD_PINS_D6 41
#define LCD_PINS_D7 40
#define LCD_PINS_D7 40
#define BTN_EN1 11
#define BTN_EN1 11
#define BTN_EN2 12
#define BTN_EN2 12
#define BTN_ENC 43
#define BTN_ENC 43
//encoder rotation values
#define BLEN_C 2
#define BLEN_B 1
#define BLEN_A 0
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif //MOTHERBOARD==80
#endif //MOTHERBOARD==80
@ -1256,7 +1201,7 @@
#define LED_PIN -1
#define LED_PIN -1
#define FAN_PIN -1
#define FAN_PIN -1
#define PS_ON_PIN 14
#define PS_ON_PIN 14
#define KILL_PIN -1
#define KILL_PIN -1
@ -1295,7 +1240,7 @@
*MISO(D6)PB67||34PA6(AI6/D25)
*MISO(D6)PB67||34PA6(AI6/D25)
*SCK(D7)PB78||33PA7(AI7/D24)
*SCK(D7)PB78||33PA7(AI7/D24)
*RST9||32AREF
*RST9||32AREF
*VCC10||31GND
*VCC10||31GND
*GND11||30AVCC
*GND11||30AVCC
*XTAL212||29PC7(D23)
*XTAL212||29PC7(D23)
*XTAL113||28PC6(D22)
*XTAL113||28PC6(D22)
@ -1352,7 +1297,7 @@
#define KILL_PIN -1
#define KILL_PIN -1
#define HEATER_0_PIN 4
#define HEATER_0_PIN 4
#define HEATER_1_PIN -1 // 12
#define HEATER_1_PIN -1 // 12
#define HEATER_2_PIN -1 // 13
#define HEATER_2_PIN -1 // 13
#define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define TEMP_0_PIN 0 //D27 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#define TEMP_1_PIN -1 // 1
#define TEMP_1_PIN -1 // 1
@ -1390,12 +1335,12 @@
#define E0_ENABLE_PIN 10
#define E0_ENABLE_PIN 10
/* future proofing */
/* future proofing */
#define __FS20
#define __FS20
#define __FD19
#define __FD19
#define __GS18
#define __GS18
#define __GD13
#define __GD13
#define UNUSED_PWM 14/* PWM on LEFT connector */
#define UNUSED_PWM 14/* PWM on LEFT connector */
#define E1_STEP_PIN -1 // 21
#define E1_STEP_PIN -1 // 21
#define E1_DIR_PIN -1 // 20
#define E1_DIR_PIN -1 // 20
@ -1414,18 +1359,18 @@
#define KILL_PIN -1
#define KILL_PIN -1
#define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
#define HEATER_0_PIN 3 /*DONE PWM on RIGHT connector */
#define HEATER_1_PIN -1
#define HEATER_1_PIN -1
#define HEATER_2_PIN -1
#define HEATER_2_PIN -1
#define HEATER_1_PIN -1
#define HEATER_1_PIN -1
#define HEATER_2_PIN -1
#define HEATER_2_PIN -1
#define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
#define TEMP_0_PIN 0 // ANALOG INPUT NUMBERING
#define TEMP_1_PIN 1 // ANALOG
#define TEMP_1_PIN 1 // ANALOG
#define TEMP_2_PIN -1 // 2
#define TEMP_2_PIN -1 // 2
#define HEATER_BED_PIN 4
#define HEATER_BED_PIN 4
#define TEMP_BED_PIN 2 // 1,2 or I2C
#define TEMP_BED_PIN 2 // 1,2 or I2C
#define I2C_SCL16
#define I2C_SCL16
#define I2C_SDA17
#define I2C_SDA17
#endif
#endif
@ -1466,7 +1411,7 @@
#define Z_MS2_PIN 67
#define Z_MS2_PIN 67
#define HEATER_BED_PIN 3
#define HEATER_BED_PIN 3
#define TEMP_BED_PIN 2
#define TEMP_BED_PIN 2
#define HEATER_0_PIN 9
#define HEATER_0_PIN 9
#define TEMP_0_PIN 0
#define TEMP_0_PIN 0
@ -1474,7 +1419,11 @@
#define HEATER_1_PIN 7
#define HEATER_1_PIN 7
#define TEMP_1_PIN 1
#define TEMP_1_PIN 1
#ifdef BARICUDA
#define HEATER_2_PIN 6
#else
#define HEATER_2_PIN -1
#define HEATER_2_PIN -1
#endif
#define TEMP_2_PIN -1
#define TEMP_2_PIN -1
#define E0_STEP_PIN 34
#define E0_STEP_PIN 34
@ -1555,9 +1504,9 @@
#define HEATER_0_PIN 9 // EXTRUDER 1
#define HEATER_0_PIN 9 // EXTRUDER 1
#define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
#define HEATER_1_PIN 8 // EXTRUDER 2 (FAN On Sprinter)
#define HEATER_2_PIN -1
#define HEATER_2_PIN -1
#if TEMP_SENSOR_0 == -1
#if TEMP_SENSOR_0 == -1
#define TEMP_0_PIN 8 // ANALOG NUMBERING
#define TEMP_0_PIN 8 // ANALOG NUMBERING
#else
#else
#define TEMP_0_PIN 13 // ANALOG NUMBERING
#define TEMP_0_PIN 13 // ANALOG NUMBERING
@ -1569,37 +1518,27 @@
#define HEATER_BED_PIN 10 // BED
#define HEATER_BED_PIN 10 // BED
#define TEMP_BED_PIN 14 // ANALOG NUMBERING
#define TEMP_BED_PIN 14 // ANALOG NUMBERING
#define BEEPER 33// Beeper on AUX-4
#define BEEPER 33// Beeper on AUX-4
#ifdef ULTRA_LCD
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef NEWPANEL
//arduino pin which triggers an piezzo beeper
//arduino pin which triggers an piezzo beeper
#define LCD_PINS_RS 16
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
#define LCD_PINS_D4 23
#define LCD_PINS_D5 25
#define LCD_PINS_D5 25
#define LCD_PINS_D6 27
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#define LCD_PINS_D7 29
//buttons are directly attached using AUX-2
//buttons are directly attached using AUX-2
#define BTN_EN1 59
#define BTN_EN1 59
#define BTN_EN2 64
#define BTN_EN2 64
#define BTN_ENC 43 //the click
#define BTN_ENC 43 //the click
#define BLEN_C 2
#define SDCARDDETECT -1 // Ramps does not use this port
#define BLEN_B 1
#define BLEN_A 0
#define SDCARDDETECT -1 // Ramps does not use this port
//encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
#endif
#endif
#endif //ULTRA_LCD
#endif //ULTRA_LCD
@ -1610,7 +1549,7 @@
#endif
#endif
//List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
//List of pins which to ignore when asked to change by gcode, 0 and 1 are RX and TX, do not mess with those!
/* Custom characters defined in the first 8 characters of the LCD */
lcd.print(itostr3(tHotend));
#define LCD_STR_BEDTEMP "\x00"
lcd.print('/');
#define LCD_STR_DEGREE "\x01"
lcd.print(itostr3left(tTarget));
#define LCD_STR_THERMOMETER "\x02"
lcd_printPGM(PSTR(LCD_STR_DEGREE""));
#define LCD_STR_UPLEVEL "\x03"
if(tTarget<10)
#define LCD_STR_REFRESH "\x04"
lcd.print('');
#define LCD_STR_FOLDER "\x05"
#define LCD_STR_FEEDRATE "\x06"
# if EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
#define LCD_STR_CLOCK "\x07"
//If we have an 2nd extruder or heated bed, show that in the top right corner
#define LCD_STR_ARROW_RIGHT "\x7E" /* from the default character set */
lcd.setCursor(10,0);
# if EXTRUDERS > 1
staticvoidlcd_implementation_init()
tHotend=int(degHotend(1)+0.5);
{
tTarget=int(degTargetHotend(1)+0.5);
bytebedTemp[8]=
lcd.print(LCD_STR_THERMOMETER[0]);
{
# else//Heated bed
B00000,
tHotend=int(degBed()+0.5);
B11111,
tTarget=int(degTargetBed()+0.5);
B10101,
lcd.print(LCD_STR_BEDTEMP[0]);
B10001,
# endif
B10101,
lcd.print(itostr3(tHotend));
B11111,
lcd.print('/');
B00000,
lcd.print(itostr3left(tTarget));
B00000
lcd_printPGM(PSTR(LCD_STR_DEGREE""));
};//thanks Sonny Mounicou
if(tTarget<10)
bytedegree[8]=
lcd.print('');
{
# endif//EXTRUDERS > 1 || TEMP_SENSOR_BED != 0
B01100,
#endif//LCD_WIDTH > 19
B10010,
B10010,
#if LCD_HEIGHT > 2
B01100,
//Lines 2 for 4 line LCD
B00000,
# if LCD_WIDTH < 20
B00000,
# ifdef SDSUPPORT
B00000,
lcd.setCursor(0,2);
B00000
lcd_printPGM(PSTR("SD"));
};
if(IS_SD_PRINTING)
bytethermometer[8]=
lcd.print(itostr3(card.percentDone()));
{
else
B00100,
lcd_printPGM(PSTR("---"));
B01010,
lcd.print('%');
B01010,
# endif//SDSUPPORT
B01010,
# else//LCD_WIDTH > 19
B01010,
# if EXTRUDERS > 1 && TEMP_SENSOR_BED != 0
B10001,
//If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
//If we both have a 2nd extruder and a heated bed, show the heated bed temp on the 2nd line on the left, as the first line is filled with extruder temps
This RepRap firmware is a mashup between <ahref="https://github.com/kliment/Sprinter">Sprinter</a>, <ahref="https://github.com/simen/grbl/tree">grbl</a> and many original parts.
Quick Information
Derived from Sprinter and Grbl by Erik van der Zalm.
===================
Sprinters lead developers are Kliment and caru.
This RepRap firmware is a mashup between <ahref="https://github.com/kliment/Sprinter">Sprinter</a>, <ahref="https://github.com/simen/grbl/tree">grbl</a> and many original parts.
Grbls lead developer is Simen Svale Skogsrud. Sonney Jeon (Chamnit) improved some parts of grbl
A fork by bkubicek for the Ultimaker was merged, and further development was aided by him.
Derived from Sprinter and Grbl by Erik van der Zalm.
Some features have been added by:
Sprinters lead developers are Kliment and caru.
Lampmaker, Bradley Feldman, and others...
Grbls lead developer is Simen Svale Skogsrud. Sonney Jeon (Chamnit) improved some parts of grbl
A fork by bkubicek for the Ultimaker was merged, and further development was aided by him.
Some features have been added by:
Features:
Lampmaker, Bradley Feldman, and others...
* Interrupt based movement with real linear acceleration
* High steprate
Features:
* Look ahead (Keep the speed high when possible. High cornering speed)
* Interrupt based temperature protection
* Interrupt based movement with real linear acceleration
* preliminary support for Matthew Roberts advance algorithm
* High steprate
For more info see: http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
* Look ahead (Keep the speed high when possible. High cornering speed)
* Full endstop support
* Interrupt based temperature protection
* SD Card support
* preliminary support for Matthew Roberts advance algorithm
* SD Card folders (works in pronterface)
For more info see: http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
* SD Card autostart support
* Full endstop support
* LCD support (ideally 20x4)
* SD Card support
* LCD menu system for autonomous SD card printing, controlled by an click-encoder.
* SD Card folders (works in pronterface)
* EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables
* SD Card autostart support
* many small but handy things originating from bkubicek's fork.
* LCD support (ideally 20x4)
* Arc support
* LCD menu system for autonomous SD card printing, controlled by an click-encoder.
* Temperature oversampling
* EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables
* Dynamic Temperature setpointing aka "AutoTemp"
* many small but handy things originating from bkubicek's fork.
* Support for QTMarlin, a very beta GUI for PID-tuning and velocity-acceleration testing. https://github.com/bkubicek/QTMarlin
* Arc support
* Endstop trigger reporting to the host software.
* Temperature oversampling
* Updated sdcardlib
* Dynamic Temperature setpointing aka "AutoTemp"
* Heater power reporting. Useful for PID monitoring.
* Support for QTMarlin, a very beta GUI for PID-tuning and velocity-acceleration testing. https://github.com/bkubicek/QTMarlin
* PID tuning
* Endstop trigger reporting to the host software.
* CoreXY kinematics (www.corexy.com/theory.html)
* Updated sdcardlib
* Configurable serial port to support connection of wireless adaptors.
* Heater power reporting. Useful for PID monitoring.
* PID tuning
The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
* CoreXY kinematics (www.corexy.com/theory.html)
* Configurable serial port to support connection of wireless adaptors.
* Automatic operation of extruder/cold-end cooling fans based on nozzle temperature
Differences and additions to the already good Sprinter firmware:
The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
*Look-ahead:*
Differences and additions to the already good Sprinter firmware:
Marlin has look-ahead. While sprinter has to break and re-accelerate at each corner,
If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec].
This can now be performed by the AutoTemp function
The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax.
By calling M109 S<mintemp> T<maxtemp> F<factor> you enter the autotemp mode.
If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change.
Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode.
You can leave it by calling M109 without any F.
If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec].
*EEPROM:*
The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax.
If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change.
If you know your PID values, the acceleration and max-velocities of your unique machine, you can set them, and finally store them in the EEPROM.
Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode.
After each reboot, it will magically load them from EEPROM, independent what your Configuration.h says.
*EEPROM:*
*LCD Menu:*
If you know your PID values, the acceleration and max-velocities of your unique machine, you can set them, and finally store them in the EEPROM.
If your hardware supports it, you can build yourself a LCD-CardReader+Click+encoder combination. It will enable you to realtime tune temperatures,
After each reboot, it will magically load them from EEPROM, independent what your Configuration.h says.
accelerations, velocities, flow rates, select and print files from the SD card, preheat, disable the steppers, and do other fancy stuff.
One working hardware is documented here: http://www.thingiverse.com/thing:12663
*LCD Menu:*
Also, with just a 20x4 or 16x2 display, useful data is shown.
If your hardware supports it, you can build yourself a LCD-CardReader+Click+encoder combination. It will enable you to realtime tune temperatures,
*SD card folders:*
accelerations, velocities, flow rates, select and print files from the SD card, preheat, disable the steppers, and do other fancy stuff.
One working hardware is documented here: http://www.thingiverse.com/thing:12663
If you have an SD card reader attached to your controller, also folders work now. Listing the files in pronterface will show "/path/subpath/file.g".
Also, with just a 20x4 or 16x2 display, useful data is shown.
You can write to file in a subfolder by specifying a similar text using small letters in the path.
Also, backup copies of various operating systems are hidden, as well as files not ending with ".g".
*SD card folders:*
*SD card folders:*
If you have an SD card reader attached to your controller, also folders work now. Listing the files in pronterface will show "/path/subpath/file.g".
You can write to file in a subfolder by specifying a similar text using small letters in the path.
If you place a file auto[0-9].g into the root of the sd card, it will be automatically executed if you boot the printer. The same file will be executed by selecting "Autostart" from the menu.
Also, backup copies of various operating systems are hidden, as well as files not ending with ".g".
First *0 will be performed, than *1 and so on. That way, you can heat up or even print automatically without user interaction.
*SD card folders:*
*Endstop trigger reporting:*
If you place a file auto[0-9].g into the root of the sd card, it will be automatically executed if you boot the printer. The same file will be executed by selecting "Autostart" from the menu.
If an endstop is hit while moving towards the endstop, the location at which the firmware thinks that the endstop was triggered is outputed on the serial port.
First *0 will be performed, than *1 and so on. That way, you can heat up or even print automatically without user interaction.
This is useful, because the user gets a warning message.
However, also tools like QTMarlin can use this for finding acceptable combinations of velocity+acceleration.
*Endstop trigger reporting:*
*Coding paradigm:*
If an endstop is hit while moving towards the endstop, the location at which the firmware thinks that the endstop was triggered is outputed on the serial port.
This is useful, because the user gets a warning message.
Not relevant from a user side, but Marlin was split into thematic junks, and has tried to partially enforced private variables.
However, also tools like QTMarlin can use this for finding acceptable combinations of velocity+acceleration.
This is intended to make it clearer, what interacts which what, and leads to a higher level of modularization.
We think that this is a useful prestep for porting this firmware to e.g. an ARM platform in the future.
*Coding paradigm:*
A lot of RAM (with enabled LCD ~2200 bytes) was saved by storing char []="some message" in Program memory.
In the serial communication, a #define based level of abstraction was enforced, so that it is clear that
Not relevant from a user side, but Marlin was split into thematic junks, and has tried to partially enforced private variables.
some transfer is information (usually beginning with "echo:"), an error "error:", or just normal protocol,
This is intended to make it clearer, what interacts which what, and leads to a higher level of modularization.
necessary for backwards compatibility.
We think that this is a useful prestep for porting this firmware to e.g. an ARM platform in the future.
A lot of RAM (with enabled LCD ~2200 bytes) was saved by storing char []="some message" in Program memory.
*Interrupt based temperature measurements:*
In the serial communication, a #define based level of abstraction was enforced, so that it is clear that
some transfer is information (usually beginning with "echo:"), an error "error:", or just normal protocol,
An interrupt is used to manage ADC conversions, and enforce checking for critical temperatures.
necessary for backwards compatibility.
This leads to less blocking in the heater management routine.
*Interrupt based temperature measurements:*
Non-standard M-Codes, different to an old version of sprinter:
An interrupt is used to manage ADC conversions, and enforce checking for critical temperatures.
* M17 - Enable/Power all stepper motors. Compatibility to ReplicatorG.
* G3 - CCW ARC
* M18 - Disable all stepper motors; same as M84.Compatibility to ReplicatorG.
* M30 - Print time since last M109 or SD card start to serial
General:
* M42 - Change pin status via gcode
* M80 - Turn on Power Supply
* M17 - Enable/Power all stepper motors. Compatibility to ReplicatorG.
* M81 - Turn off Power Supply
* M18 - Disable all stepper motors; same as M84.Compatibility to ReplicatorG.
* M114 - Output current position to serial port
* M30 - Print time since last M109 or SD card start to serial
* M119 - Output Endstop status to serial port
* M42 - Change pin status via gcode
* M80 - Turn on Power Supply
Movement variables:
* M81 - Turn off Power Supply
* M114 - Output current position to serial port
* M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
* M119 - Output Endstop status to serial port
* M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
* M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
Movement variables:
* M206 - set home offsets. This sets the X,Y,Z coordinates of the endstops (and is added to the {X,Y,Z}_HOME_POS configuration options (and is also added to the coordinates, if any, provided to G82, as with earlier firmware)
* M220 - set build speed mulitplying S:factor in percent ; aka "realtime tuneing in the gcode". So you can slow down if you have islands in one height-range, and speed up otherwise.
* M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
* M221 - set the extrude multiplying S:factor in percent
* M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
* M400 - Finish all buffered moves.
* M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
* M206 - set home offsets. This sets the X,Y,Z coordinates of the endstops (and is added to the {X,Y,Z}_HOME_POS configuration options (and is also added to the coordinates, if any, provided to G82, as with earlier firmware)
Temperature variables:
* M220 - set build speed mulitplying S:factor in percent ; aka "realtime tuneing in the gcode". So you can slow down if you have islands in one height-range, and speed up otherwise.
* M301 - Set PID parameters P I and D
* M221 - set the extrude multiplying S:factor in percent
* M302 - Allow cold extrudes
* M400 - Finish all buffered moves.
* M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
Temperature variables:
Advance:
* M301 - Set PID parameters P I and D
* M302 - Allow cold extrudes
* M200 - Set filament diameter for advance
* M303 - PID relay autotune S<temperature> sets the target temperature. (default target temperature = 150C)
* M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk
Advance:
EEPROM:
* M200 - Set filament diameter for advance
* M500 - stores paramters in EEPROM. This parameters are stored: axis_steps_per_unit, max_feedrate, max_acceleration ,acceleration,retract_acceleration,
* M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk
* M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
EEPROM:
* M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
* M503 - print the current settings (from memory not from eeprom)
* M500 - stores paramters in EEPROM. This parameters are stored: axis_steps_per_unit, max_feedrate, max_acceleration ,acceleration,retract_acceleration,