Ok, i went thru some official samples and found a sample for a buzzer
/config/sample-macros.cfg
it have section for a beeper and some explanation
[pwm_cycle_time BEEPER_pin]
Then i went to your klippy.log which have your configuration,
your latest configuration have this section
[pwm_tool buzzer]
pin = PB0
value = 0
shutdown_value = 0
cycle_time = 0.001
And klipper did accept it without any issue - so your klipper is accepting pwm
configurations.
What to do next:
- If you have Arduino - launch it and try to test your Speaker module in arduino (you have some samples in device description link which you did post), this way you will be sure that your speaker module is working as intended and you are not trying to use faulty module.
- read about klipper architecture here: Klipper Architecture / Ecosystem
- try to change your definition of a
buzzer
to this:
[pwm_cycle_time buzzer]
pin = PB0
value = 0
shutdown_value = 0
cycle_time = 0.001
- I see in your config that you already have defined gcode command
M300
which is very similar to/config/sample-macros.cfg
for aBEEPER_pin
, but for initial testing you should avoid it’s usage, use direct command
SET_PIN PIN=buzzer VALUE=2 CYCLE_TIME=0.001
- If you will get it working, then you can start using M300 command and other macros which uses M300 to play some sound sequences.
- Report your results.
Why i’m sending you to read about klipper architecture:
During this thread you was mentioning following
By looking at your logs and your few configs which you did post i see that you always was using pin = PB0
which is referencing some pin on your printer board (Main MCU) i did see usage of Rpi pins in logs but only for your chamber
sensor, but nothing else, So you need to be clear what exact pin you are trying to use and where, how correctly reference it in config, because each MCU have different names for pins and you should use prefix if you referencing non main MCU.