Devices & Components
Arduino Uno Rev3
Jumper wires (generic)
Resistor 100 ohm
Buzzer
Software & Tools
Arduino IDE
Project description
Code
BUZZER AND ITS USES
arduino
1const int buzzer = 9; //buzzer to arduino pin 9 2 3 4void setup(){ 5 6 pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output 7 8} 9 10void loop(){ 11 12 tone(buzzer, 1000); // Send 1KHz sound signal... 13 delay(1000); // ...for 1 sec 14 noTone(buzzer); // Stop sound... 15 delay(1000); // ...for 1sec 16 17}
BUZZER AND ITS USES
arduino
1const int buzzer = 9; //buzzer to arduino pin 9 2 3 4void setup(){ 5 6 pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output 7 8} 9 10void loop(){ 11 12 tone(buzzer, 1000); // Send 1KHz sound signal... 13 delay(1000); // ...for 1 sec 14 noTone(buzzer); // Stop sound... 15 delay(1000); // ...for 1sec 16 17}
Documentation
CONNECTIONS
CONNECTIONS

CONNECTIONS
CONNECTIONS

CONNECTIONS
CONNECTIONS

Comments
Only logged in users can leave comments