Interfacing of the Active Buzzer with Arduino
INSTRUCTIONS
Step-1(Info.)
1.)
Source
2.)
Target
Note:
Make Connections First, Then move to the code Compilation
Step-2 (Connections)
1.)Drag and drop BreadBoard,Arduino and all other Components first.
2.)Connect
Gnd/Negative Pin
of buzzer with
Pin 3
of breadboard..
3.)Connect
positive Pin
of buzzer with
Pin 1
of breadboard..
4.)Connect
Pin 2
of Breadboard with
Pin 11
of Arduino..
5.)Connect
Pin 5
of Breadboard with
GND Pin
of Arduino..
6.)Connect
Pin 4
of Breadboard with
Pin (5V)
of Arduino..
8.)Click on
"CHECK"
button to check the connections.
Step-3 (Code Compilation)
1.) Set pinMode of buzzer as
"OUTPUT"
2.) Set tone as
"buzzer"
.
4.) click on
"COMPILE"
button to run and compile the code.
Components
Buzzer
Resister1
Arduino
BreadBoard
2
3
4
1
5
Bread Board
Buzzer
Name :
Resister1
Value
1k ohm Resister
Arduino UNO
Code Compiler
const int
buzzer =
11
;
void
setup() {
pinMode
(buzzer,
);
}
void
loop() {
tone(
,1000);
delay
(15);
noTone(buzzer);
delay
(15);
}
CHECK
RESET
COMPILE
PRINT
© 2024 | Virtual Labs, IIT Roorkee