Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [buzzer]

The tag has no usage guidance.

0
votes
0answers
19 views

need help with timer Buzzer interrupts [on hold]

So, I need help. I need somebody to make me a code for a buzzer time interrupt. I use Arduino Uno, the port I use is pin 12. I need it for a school project and I am not good at programming. When you ...
0
votes
0answers
17 views

Shall an active piezo buzzer module draw as much as 10mA on its signal pin?

I have connected an active piezo buzzer to my arduino: KY-012 Active buzzer module. I was a bit surprised that it drew like ~10mA on the signal pin from my nodemcu, which I find a bit weird, since ...
0
votes
0answers
16 views

How to stop and repeat a melody using a button?

How can we make our melody stop when we press the button the first time and repeat the melody when we press the button the second time? // Noterna defineras #define NOTE_B0 31 #define NOTE_C1 33 #...
0
votes
0answers
57 views

Multiple Servo motors with an ultrasonic sensor

I am building a robot arm with 6 servo motors that works with an ultrasonic sensor. The purpose of the program is when an object is detected at 20 cm (fixed position) from the sensor, the buzzer and ...
0
votes
3answers
589 views

Passive buzzer works with analogWrite(), but not with digitalWrite(). It also has constant static noise

I have a YL-44/MH-FMD passive piezo buzzer hooked up to an ESP8266/NodeMCU. It's connected like this: Buzzer ---> NodeMCU - GND ---> G - VCC ---> 3V - I/O ---> D2 This code makes a clear beep. ...
0
votes
2answers
41 views

Won't break out of for loop

I'm new to Arduino and I'm trying to use PWM to generate a tone through a buzzer. I've created a for loop, however, the for loop doesn't seem to break when the variable ms is < 1000000. int ...
0
votes
4answers
75 views

help with a loop

I recently got into programing and I'm making an alarm. I cant figure out how to make a buzzer loop. I have two blinking LED's and two fading ones. Now I plan to have sound and it won't work. It only ...
0
votes
1answer
707 views

Arduino - Playing WAV files with a buzzer

I have developed an Arduino program that plays a WAV file from the SD card using a speaker. This is the circuit schematic The sketch I'm using is based on TMRpcm library and PWM output #include <...
1
vote
2answers
143 views

How can you have two blinking leds and a fading one

I am trying to make a alarm and I have two blinking leds (red and blue). They work fine but I want two more that fade in and out. I have a buzzer on it too. I am very new to programming. By the way, ...
1
vote
1answer
76 views

How to detect when intercom is ringing?

For my apartment, I need to check when intercom is ringing and call an API in that case. I was thinking about using an AC input / DC output relay, since the buzzer signal is an AC signal. Is there an ...
0
votes
1answer
35 views

everything works independitly but not together. Piezo not generating a tone

My goal with the code is simple. Let the Piezo buzz when temperature reaches 25 degrees. My piezo is hooked up correctly, because It makes a buzz when the arduino boots or when I put this line of code ...
0
votes
1answer
64 views

Arduino - Push Button State Problem

My problem is I want the buzzer to stop after a certain amount of time, regardless if it is still pressed or not. I have tried to implement a boolean statement to the code but to no avail(I'm not ...
1
vote
2answers
495 views

Stop Arduino Timer after some seconds

I'm building a basic program that when a button is pressed, a buzzer comes on. I would like however to make it so that the buzzer stops after a short period of time (e.g. 5-7 seconds). Here is the ...
0
votes
3answers
2k views

Is there a way to play .mp3 files from an SD card on Arduino?

Is there a way to have mp3 files on an SD card in the SD card shield for the Arduino and play an mp3 file on that SD card with a buzzer? If possible also with something like: playmp3(thismp3.mp3); ...
0
votes
1answer
99 views

Joysitck with servo, LED array and buzzer [closed]

Does anybody know of a sketch that can turn a single servo 180 degrees clockwise/counterclockwise with the x axis of a joystick, light a bar graph LED with the Y axis, and sound a buzzer when the ...
3
votes
5answers
613 views

Emergency Vehicle - Make two LEDs flash with buttons and a passive buzzer change sound

My Dad and I are just learning how to use my new UNO. We have learned how to make leds flash at the touch of a button. We have also learned how to make a passive buzzer sound at the touch of a ...
1
vote
2answers
44 views

How do I create a constant loop with an event that only occurs once?

I am currently working in void loop() and have setup a distance meter that constantly checks the distance. Once the distance threshold is met, a function is called. Now I only need this function to ...
0
votes
3answers
1k views

How can I loop for a set amount of time when a condition is met?

I'm trying to create an Arduino project with a light sensor and a buzzer. The idea is that when the sensor detects that the lights have gone off, the buzzer will sound for 5 seconds. At some point, ...
0
votes
1answer
200 views

What is wrong with my state machines?

My goal is to make an automatic gate and garage door, and it has a servo as the lock mechanism on the gate, and alarm systems that notify when the gate or garage door is open too long, more than the ...
0
votes
1answer
217 views

Execute function until called again?

I am building a simple security system with my Arduino Uno. I have an alarm() function: void alarm() { tone(8, 3300, 200); delay(200); tone(8, 3000, 200); delay(200); } When I call it in the ...
0
votes
1answer
2k views

How do I make specific tones with a piezo buzzer?

I am using a piezo buzzer and fiddling around with it a little bit. I currently have different tones with delays in between and I have to do a lot of trial and error for the piezo buzzer to play ...
0
votes
2answers
2k views

Start/Stop/Reset the melody using buttons

I have 2 buttons. Button 1 will start/stop the melody while the button 2 will reset the melody. My melody is "Happy Birthday". How am I going to use the buttons to start/stop/reset the melody? Here'...
0
votes
1answer
212 views

Need to filter low voltage from a piezo buzzer circuit [closed]

I have a 6-28VDC piezo buzzer I'm using at 24VDC. The line has 3-4 VDC when the output is off, which has a soft but annoying buzzer constantly. What the the easiest way to filter that out so I only ...
1
vote
2answers
1k views

Adding external power supply to any arduino connected component

I have an Arduino Pro Mini 3.3v and the voltage is too small for my buzzer to ring loudly. I want to add a 9v battery to power the buzzer. This is my current circuit: Arduino (pin 9) => Buzzer +ve ...
1
vote
1answer
824 views

Controlling buzzer with assembly

I want to make a piezo buffer beeping with assembly code, but i haven't managed to yet. I have an Arduino UNO board (ATMega328p) and using avra and avrdude to build and load. The buzzer just stay ...
2
votes
3answers
6k views

Circuit with buzzer not working :(

so I have a circuit with a buzzer and a resistor: This circuit should be working, but for some reason the buzzer doesn't sound. I pushed the buzzer into the breadboard as hard as I could, I put the + ...
-1
votes
1answer
469 views

Error when using buzzer and IR sensor

I am doing code for IR sensor. My problem is when I put this code (below) for buzzer, there will be error. C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/Tone.cpp:536: multiple ...
-1
votes
2answers
439 views

What would be the code for using Arduino UNO to alert by sound or LED when it detects a certain position through GPS?

I am in grade 6. I have a very nice pet dog in my house but it often enters Mom's kitchen to spoil all the foods. So I am thinking of a device to attach with him which can locate its position. But I ...
0
votes
2answers
651 views

Signal pin of buzzer is connected with which Arduino uno pin

I bought a 3 pin buzzer. It has positive, negative and signal pin. I don't understand how this signal pin should be connected with the Arduino. Here is reported the description page of the buzzer.
-1
votes
1answer
103 views

How to use TimerOne while calculating time?

I'm trying to get warning with buzzer while I get same values on 3 seconds. But first warning doesn't wait 3 seconds. Second warning is correct. Code is attached. BlinkLED1() method is same BlinkLED2. ...
1
vote
1answer
153 views

Using Piezzo Electric buzzer 10V with an Arduino Lilypad USB

I bought a 10 V Piezzo electric buzzer and I wonder how to connect it to an Arduino (in my case a Lilypad USB, but the question stands for any Arduino I guess...). I hadn't realized this was a 10V ...
0
votes
2answers
5k views

Drive 12V Piezo Buzzer (Arduino)

I want to drive this 12V piezo buzzer: http://www.conrad.com/ce/en/product/130256/Kemo-L001-High-Freqeuncy-Piezo-Speaker-Component-12-24-V This is the circuit I am using. The Arduino is powered by a ...