0% found this document useful (0 votes)
8 views4 pages

Tone Generation Using Arduino

The document outlines a project to generate audio tones using an Arduino UNO and a buzzer or speaker. It includes a list of required apparatus, a step-by-step procedure for connecting the components and uploading the code, and a sample code that produces different frequencies. The result confirms the successful generation of various audio tones by varying the frequency with the tone() function.

Uploaded by

lokielogesh85
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views4 pages

Tone Generation Using Arduino

The document outlines a project to generate audio tones using an Arduino UNO and a buzzer or speaker. It includes a list of required apparatus, a step-by-step procedure for connecting the components and uploading the code, and a sample code that produces different frequencies. The result confirms the successful generation of various audio tones by varying the frequency with the tone() function.

Uploaded by

lokielogesh85
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Tone Generation using Arduino

Aim:
To generate different audio tones using an Arduino UNO by interfacing a buzzer/speaker and
using the `tone()` function.

Apparatus Required:
* Arduino UNO
* Piezo buzzer / small speaker
* Connecting wires
* Breadboard (optional)
* USB cable
* Computer with Arduino IDE

Procedure
1. Connect the buzzer to the Arduino as per the circuit diagram.
2. Open Arduino IDE and write the program.
3. Select the correct board and COM port.
4. Upload the program to the Arduino.
5. Observe the buzzer producing different tones.

CODING:

int buzzer = 8;
setup()
{ void
pinMode(buzzer, OUTPUT);
}

void loop()
{
tone(buzzer, 500); // Generate 500 Hz tone
delay(1000);

tone(buzzer, 1000); // Generate 1000 Hz tone


delay(1000);

tone(buzzer, 1500); // Generate 1500 Hz tone


delay(1000);

noTone(buzzer); // Stop tone


delay(1000);
}
CIRCUIT DIAGRAM:
Result:

Different audio tones were successfully generated using Arduino UNO by


varying the frequency using the tone() function.

You might also like