Welcome! Log In Create A New Profile

Advanced

Marlin Speaker / Buzzer control

Posted by qwewer 
Marlin Speaker / Buzzer control
April 27, 2020 01:46PM
Can someone point me to the part(s) of marlin that tells a 3D printer board (Creality3D 1.1.3) to send a signal to a Speaker or Buzzer (CR10_STOCKDISPLAY with by default a multi tone piezo buzzer(?)) when using an M300 command or when navigating in the printer menus?

Originally (Marlin 1.1.6) by sending an M300 command to the printer, I was able to make the stock displays buzzer to make different tones, in order to make an "end of print" music. But then I switched out the board to an SKR Mini, and now (2.0.x) when either defining speaker in marlin it doesn't makes any sound or by defining buzzer it makes a sound when navigating in the menus or with an M300 command, but only in a single frequency. I'm interested in the marlin(?) code(s) that tells the buzzer to make a sound in a specific frequency, and if maybe that can be changed.

Thanks in advance.
Re: Marlin Speaker / Buzzer control
April 27, 2020 02:20PM
By default Marlin is set for buzzer with a fixed frequency. If you have a speaker enable it below.

//#define SPEAKER

The Buzzer frequency is set in the lines below.

//#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
//#define LCD_FEEDBACK_FREQUENCY_HZ 1000


Then you can Test audio output with G-code M300 S-frequency Hz: P-duration ms>

Edited 3 time(s). Last edit at 04/27/2020 02:23PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Re: Marlin Speaker / Buzzer control
April 27, 2020 02:28PM
Yes, I know about the #define SPEAKER / BUZZER, and the other ones too, but by changing the LCD_FEEDBACK_FREQUENCY_HZ the frequency of the sound doesn't changes, as if that would be the case then the M300 command would work perfectly.
But I don't know if the frequency that I hear when navigating in the printer is specified somewhere in marlin or is it because something else.

Anyway, I appreciate the answer.

Edited 1 time(s). Last edit at 04/27/2020 02:57PM by qwewer.
Re: Marlin Speaker / Buzzer control
April 28, 2020 08:11AM
This is also true on my LCD controller as it has a piezo buzzer,


Computer Programmer / Electronics Technician
Re: Marlin Speaker / Buzzer control
April 28, 2020 11:27AM
Were you able to use M300 before? Like this?
Re: Marlin Speaker / Buzzer control
April 28, 2020 03:45PM
Never! I have the LCD2004 Controllers, Have Never got them to function like your video.

Edited 1 time(s). Last edit at 04/28/2020 04:18PM by Roberts_Clif.


Computer Programmer / Electronics Technician
Sorry, only registered users may post in this forum.

Click here to login