GCODE M300 Command?

I the M300 (gcode for beep/sound) command supported by the Ender 3 KE firmware???

I cant get it working anyway.
Thanks!

I don’t think Klipper or versions of it support M300 without some Macros

do you know the code/script for the macro?

It can get involved but you can search on YT for m300 macros for klipper or something similar and learn… :smiley:

alredy did a research over google… but i think i need the adress, name, pin number or something like that where the buzzer is it, i look on the printer PCB and NEBULA PAD PCB and cant find any data
about the buzzer.

this is an example for m300. You have to check the correct pin number for the beep output

[output_pin BEEPER_pin]
pin: ar37

Beeper pin. This parameter must be provided.

ar37 is the default RAMPS/MKS pin.

pwm: True

A piezo beeper needs a PWM signal, a DC buzzer doesn’t.

value: 0

Silent at power on, set to 1 if active low.

shutdown_value: 0

Disable at emergency shutdown (no PWM would be available anyway).

cycle_time: 0.001

Default PWM frequency : 0.001 = 1ms will give a tone of 1kHz

Although not pitch perfect.

[gcode_macro M300]
gcode:
# Use a default 1kHz tone if S is omitted.
{% set S = params.S|default(1000)|int %}
# Use a 10ms duration is P is omitted.
{% set P = params.P|default(100)|int %}
SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0

Bill

1 Like

Tnaks for the reply, the “pin number” is what i dont know how to find it.

I do not know if the Ender 3KE has a buzzer on the main board or it could be in the display module.
someone else may be able to help.

Bill