Notifications
Clear all

Gcode for speaker?  

  RSS
mark.s3
(@mark-s3)
Active Member
Gcode for speaker?

Does the firmware implement any gcode for sounding the speaker on the LCD module? I would like to be able to end a print job with a nice "beep beep beep" ...

Posted : 21/04/2016 8:02 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Gcode for speaker?

Hi Mark

M300 Sxx Pyy

Where xx is frequency and yy is milliseconds.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 21/04/2016 8:06 pm
renegadesk
(@renegadesk)
Estimable Member
Re: Gcode for speaker?

Mark,

When printer is finisher printing it plays ghost busters for me. I know for sure it is printer and not random beep. (I dont have nearby)

This is my whole end script.

M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G28 X0 ; home X axis
M84 ; disable motors
M300 S987 P133 ; ghost busters
M300 S987 P133
M300 S2489 P267
M300 S987 P267
M300 S2217 P267
M300 S880 P267
M300 S0 P1071
M300 S987 P133
M300 S987 P133
M300 S987 P133
M300 S987 P133
M300 S880 P267
M300 S987 P267
M300 S0 P1071

It might help you. 😀 But you need latest firmware.

Posted : 23/04/2016 8:31 pm
mark.s3
(@mark-s3)
Active Member
Topic starter answered:
Re: Gcode for speaker?

That's cute, but a little too much for me, given the speaker's inability to do much more than squawk. I'll stick with a nice triple-beep, thanks. 🙂

One thing I noticed when I added to the stock end script is that using G20 X0 to home the x-axis brings up the "Do you want to auto-level the z-axis" routine. Here's what I ended up using:
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
G91 ; use relative coordinates
G1 Z0.6 F5000 ; lift nozzle 0.6mm
G90 ; use absolute coordinates
G1 X0.2 Y185 ; move x to left and carriage forward
M117 JOB COMPLETED
M300 S1200 P400 ; beep three times
M300 S0 P400
M300 S1200 P400
M300 S0 P400
M300 S1200 P400
M300 S0 P400
M84 ; disable motors
M107 ; turn off fan

I ended up in the Reprap Wiki and found the M117 code, which added a nice touch.

Posted : 02/05/2016 5:39 am
renegadesk
(@renegadesk)
Estimable Member
Re: Gcode for speaker?

Mark,

Actually as you can see the tones changes as Peter told you:
Hi Mark

M300 Sxx Pyy

Where xx is frequency and yy is milliseconds.

Peter.
It looks long but you paste it there once and its ok, It actually sound pretty accurate to be honest.

Posted : 06/05/2016 1:13 am
mark.s3
(@mark-s3)
Active Member
Topic starter answered:
Re: Gcode for speaker?

Never said the frequencies weren't being produced. Peter's 'tune' is, to me, painful to listen to - hence my comment about the speaker. 🙂

Posted : 10/05/2016 2:33 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Gcode for speaker?

Peter's 'tune' is, to me, painful to listen to

Mark, I never presented any "tune", only the M300 GCode line.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Posted : 10/05/2016 9:55 am
Share: