I'm running a Trident I built from a Formbot kit one year ago. Recently, I upgraded the toolhead to CAN bus using a BTT SB2209. My Mainboard is a BTT Octopus F446. I have a BEEP macro in my config like this:
So
This was working fine for a year, but since the CAN upgrade it does not produce different frequencies anymore, so a
This could be some side effect of the CAN upgrade, but I don't have an idea right now how to debug this. Maybe the reason is somewhere else, because during the CAN upgrade I also updated all software components to the latest versions and re-flashed klipper. Does someone have an ideo how I can restore the old behaviour?
Code:
[gcode_macro BEEP]
gcode:
# Parameters
{% set i = params.I|default(1)|int %} ; Iterations (number of times to beep).
{% set dur = params.DUR|default(100)|int %} ; Duration/wait of each beep in ms. Default 100ms.
{% set freq = params.FREQ|default(2000)|int %} ; Frequency in Hz. Default 2kHz.
{% for iteration in range(i|int) %}
SET_PIN PIN=beeper VALUE=0.8 CYCLE_TIME={ 1.0/freq if freq > 0 else 1 }
G4 P{dur}
SET_PIN PIN=beeper VALUE=0
G4 P{dur}
{% endfor %}
So
BEEP I=1 DUR=200 FREQ=440
would produce a 440 Hz beep. I use this to play a short melody when a print starts and ends. The beep is produced using the Mini12864's integrated beeper. It is defined like this:
Code:
[output_pin beeper]
pin: EXP1_1
value: 0
shutdown_value: 0
pwm: True
cycle_time: 0.0005 ; Default beeper tone in kHz. 1 / 0.0005 = 2000Hz (2kHz)
This was working fine for a year, but since the CAN upgrade it does not produce different frequencies anymore, so a
BEEP I=1 DUR=200 FREQ=440
sounds exactly like a BEEP I=1 DUR=200 FREQ=880
This could be some side effect of the CAN upgrade, but I don't have an idea right now how to debug this. Maybe the reason is somewhere else, because during the CAN upgrade I also updated all software components to the latest versions and re-flashed klipper. Does someone have an ideo how I can restore the old behaviour?