When I used the following buzzer with HAT on Rasberrypi4, it was not worked correctly with the sample code.
Here is the code which I used on this test.
Note: When I used it on Rasberrypi3, it was worked correctly with the sample code.
Can you check the buzzer by connecting the Data Pin to Raspberry Pi 3.3v and GND to Raspberry Pi GND Pin, by this setup the buzzer makes a sound if not buzzer might be broken? please check and share your findings.
Yes, the buzzer was worked.
Happy to know that , Happy Making .
No, the buzzer was worked but if the buzzer was not worked with rasberrypi4 with HAt.
Have the same problem with the same configuration !?!?
Buzzer on HAT with Raspi3 and basic code : Working
Buzzer on HAT with Raspi4 and basic code : Not working
Is there any error? also, can you share the code?
I have just used the default sample code which it was installed by following command.
$ curl -sL <LINK_TEXT text=“https://github.com/Seeed-Studio/grove.p … install.sh”>https://github.com/Seeed-Studio/grove.py/raw/master/install.sh</LINK_TEXT> | sudo bash -s -
$ sudo grove_pwm_buzzer
No answer to this question yet? I have the same problem, also with Raspi4. I don’t have a Raspi3 to compare, but I already tried a second buzzer with the same results.
I’m new to the Pi and to Python, but I also noticed the print(buzzer.name()) command doesn’t return anything. I also tried the print(buzzer.getVolume), which also returns an error (<bound method Buzzer.getVolume of <upm.pyupm_buzzer.Buzzer; proxy of <Swig Object of type ‘upm::Buzzer *’ at 0xb5ef6818>)
It seems the object is not created (correctly)?
Anyone with a solution?
Doesn’t this work?
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s - sudo grove_pwm_buzzer
Thanks for your answer. No, that was what I already did. Even on a complete clean install of Raspian it doesn’t. Here’s the outcome:
Insert Grove-Buzzer to Grove-Base-Hat slot PWM[12 13 VCC GND]
No sound at all. The empty line above 3800 triggered me in thinking the buzzer object might not be created correctly, combined with the attempt to getVolume.
Any other ideas?
Can you checking the buzzer by connecting the buzzer +ve to raspberry pi 3.3v and buzzer -ve raspberry pi GND and check you getting any sound or something ?
Yes, buzzer works with a clean beep. Also when connected to the pwn connector the command: “gpio blink 26” works. (pin 26 being BCM pin 12). Both prove on/off works.
The grove_pwm_buzzer however suggest being able to change te pitch. I was hoping to find out how to do that. That’s why I would like to get that to work.
Any other idea?
Good that means Buzzer is working fine, we can check the python code pi! also I found this on the Grove Base Hat for Raspberry Pi Wiki
The audio jack output also uses PWM 0 and PWM 1, so you can't have audio output on that socket and use the PWMs at the same time.
so try to force the audio via HDMI and try again, meanwhile, I check other solution available
Recently purchased a new Groove base kit with the buzzer and facing the same issue as Tiemen. I am using RaspberryPi 4 . Any workarounds for this? Or is there a way to check if my PWM port is working fine?
Maybe you can use an oscilloscope to look at the waveform of the data.
having the same problem on rpi4. cant use pwm at all with base hat 12 and 13 pins