diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 0580553aa3..e41665df33 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -117,6 +117,7 @@ // M220 S- set speed factor override percentage // M221 S- set extrude factor override percentage // M240 - Trigger a camera to take a photograph +// M300 - Play beepsound S P // M301 - Set PID parameters P I and D // M302 - Allow cold extrudes // M303 - PID relay autotune S sets the target temperature. (default target temperature = 150C) @@ -1431,6 +1432,20 @@ void process_commands() } } break; + + #if defined(LARGE_FLASH) && LARGE_FLASH == true && defined(BEEPER) && BEEPER > -1 + case 300: // M300 + { + int beepS = 1; + int beepP = 1000; + if(code_seen('S')) beepS = code_value(); + if(code_seen('P')) beepP = code_value(); + tone(BEEPER, beepS); + delay(beepP); + noTone(BEEPER); + } + break; + #endif // M300 #ifdef PIDTEMP case 301: // M301 diff --git a/Marlin/pins.h b/Marlin/pins.h index 6191ed2882..dd86b2d3c6 100644 --- a/Marlin/pins.h +++ b/Marlin/pins.h @@ -321,6 +321,8 @@ #if MOTHERBOARD == 33 || MOTHERBOARD == 34 +#define LARGE_FLASH true + #define X_STEP_PIN 54 #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 @@ -789,6 +791,8 @@ #endif #endif +#define LARGE_FLASH true + #define X_STEP_PIN 25 #define X_DIR_PIN 23 #define X_MIN_PIN 22 @@ -924,6 +928,8 @@ #endif #endif +#define LARGE_FLASH true + #define X_STEP_PIN 25 #define X_DIR_PIN 23 #define X_MIN_PIN 15 @@ -1080,6 +1086,8 @@ #error Oops! Make sure you have 'Teensy++ 2.0' selected from the 'Tools -> Boards' menu. #endif +#define LARGE_FLASH true + #define X_STEP_PIN 0 #define X_DIR_PIN 1 #define X_ENABLE_PIN 39 @@ -1413,6 +1421,8 @@ #error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu. #endif +#define LARGE_FLASH true + #define X_STEP_PIN 37 #define X_DIR_PIN 48 #define X_MIN_PIN 12 @@ -1488,7 +1498,7 @@ #endif - +#define LARGE_FLASH true #define X_STEP_PIN 26 #define X_DIR_PIN 28