Buzzer does not buzz

Hi,

I’ve connected buzzer (brand new rasppi and seeed starter kit) to pwm port and tried to run the Tutorial 1 buzzer script and it does not buzz. Do you have any suggestions what i am doing wrong? How can i check if buzzer is not damaged or so? Script does not have any exception log.





buzzer = upmBuzzer.Buzzer(getGpioLookup(‘GPIO12’))

print(buzzer.name())

buzzer.setVolume(0.5)

print(buzzer.getVolume())

… (rest of the script stay the same)



buzzer.name() prints nothing

buzzer.getVolume() after setting it to 0.5 prints 0.5

Hi,



To check the buzzer is working or not by just connecting the positive terminal to Raspberry Pi 3.3v Pin and Negative terminal to Raspberry Pi GND pin. It should make a sound when you power up the Raspberry pi. if not also check with the Grove cable/Jumper wire are you using.

Ok, buzzer is fine

after:
</s><i> </i>echo 12 > /sys/class/gpio/export echo out > /sys/class/gpio/gpio12/direction echo 0 > /sys/class/gpio/gpio12/value echo 1 > /sys/class/gpio/gpio12/value <e>
i can hear sound.

But script does not work at all. Any suggestions? I am using Grove_Base_Kit_Sketchbook/Tutorial_01-Buzzer from <LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_B … Sketchbook”>https://github.com/Seeed-Studio/Grove_Base_Kit_Sketchbook</LINK_TEXT>



Is it fine for Raspberry Pi 4b? What should i change?



@Update

I have opened Tutorial3 Power of Light, and instead of servo, i attached buzzer to pwm, and it works, buzzing.

Is this tutorials: <LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_B … Sketchbook”>https://github.com/Seeed-Studio/Grove_Base_Kit_Sketchbook</LINK_TEXT>

good for RaspPi4B and yours starter kit?

Working on a Raspberry Pi 4, what’s the version of yours?