MH-FMD not outputting proper tones
Posted: Sat Mar 04, 2023 8:30 pm
I'm trying to generate a loud tone, any loud tone, from a MH-FMD low level buzzer.
I've just started working with hardware, so I see no problem with what I'm doing, wondering if other people do.
vcc is wired to vin(5v), gnd to gnd and IO to D13.
my code is simple:
I'm trying to build an alarm clock and the sound produced by this code/wiring wouldn't wake me if I used the module as an earplug.
Any help would be appreciated.
EDIT: Turns out the buzzer was broken, ordered a new one and it worked perfectly.
How do I delete a post?
I've just started working with hardware, so I see no problem with what I'm doing, wondering if other people do.
vcc is wired to vin(5v), gnd to gnd and IO to D13.
my code is simple:
Code: Select all
#include <stdbool.h>
#include "driver/gpio.h"
bool reboot = false;
void app_main(void)
{
gpio_reset_pin(13);
gpio_set_direction(13, GPIO_MODE_OUTPUT);
bool on = true;
while(1)
{
gpio_set_level(13, on);
on = !on;
}
}
Any help would be appreciated.
EDIT: Turns out the buzzer was broken, ordered a new one and it worked perfectly.
How do I delete a post?