My printer knows how to bleep!
That is to say that the controller has some kind of audio transducer which can make sounds.
So this post is about putting it to use.I noticed someone on a forum asking how to use the built-in speaker/bleeper to make sounds when the printer has finished printing. This looked like an interesting idea, so I took a closer look.
I did some initial experimentation with my printer connected to my Linux laptop. By running Pronterface it is easy to type in commands to interact with the printer.
The basic idea is to use G-code to control the audio, and as my Creality CR-10-V3 is running Marlin v220.127.116.11. firmware, the code is quite simple.
The command format is;
M300 S(frequency) P(duration)
...where S is in Hz and P is in milliseconds
So to play a sound with a frequency of 500Hz for 2 seconds;
M300 S500 P2000
However, it is not quite that straightforward on my CR-10-V3 as it does not have a speaker, it just has an audible buzzer. Therefore it does not matter what value you use for S, as long as it is > 0 the buzzer will sound at a fixed frequency.
My next step was to add sound that would play when the printer has finished printing. To do this involves adding some g-code to my Cura Slicer (V4.9.0).
Navigate the menus Settings > Printer > Manage Printer > Machine Settings;
Just add a sound sequence to the end of the Start G-code and another at the end of the End G-code.
So now I have two very annoying sound sequences; one when the machine starts to print, the other when it finishes printing.
I'll probably get rig of the start sounds, and maybe replace the end sound with S-O-S
To get my printer to play the Morse Code "S O S", the g-code might look something like this;