0% found this document useful (0 votes)
5 views5 pages

Iot-5,6,8

The document outlines three practical experiments involving Arduino circuits: generating multiple tones with a single and multiple Piezo buzzers, and controlling the color output of an RGB LED. Each experiment includes code snippets, hardware setups, and conclusions demonstrating the successful implementation of sound and color control using Arduino. The findings highlight the versatility of Arduino in electronic applications, particularly in sound generation and LED color manipulation.

Uploaded by

nannaahhahaa
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)
5 views5 pages

Iot-5,6,8

The document outlines three practical experiments involving Arduino circuits: generating multiple tones with a single and multiple Piezo buzzers, and controlling the color output of an RGB LED. Each experiment includes code snippets, hardware setups, and conclusions demonstrating the successful implementation of sound and color control using Arduino. The findings highlight the versatility of Arduino in electronic applications, particularly in sound generation and LED color manipulation.

Uploaded by

nannaahhahaa
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
You are on page 1/ 5

PRACTICAL 5

AIM:Design and implement of Arduino-Based Circuit for Generating Multiple tones using
single Piezo Buzzer.

Code:
void setup()
{
pinMode(7, OUTPUT);

void loop()
{
analogWrite(7, 20);
delay(1000); // Wait for 1000 millisecond(s)

analogWrite(7, 255);
delay(1000); // Wait for 1000 millisecond(
}

Hardware & simulation Results:

CONCLUSION:
In this experiment, an Arduino-based circuit was successfully implemented to generate multiple
tones using a single Piezo buzzer. The experiment demonstrated how an Arduino microcontroller
can efficiently control sound frequencies and durations to produce different tones, melodies, and
alerts.
PRACTICAL 6

AIM:Design and implement of Arduino-Based Circuit for Generating Multiple


tones using multiple Piezo Buzzer.

Code:
void setup()
{
pinMode(4, OUTPUT);
pinMode(3, OUTPUT);
pinMode(2, OUTPUT);
}

void loop()
{
analogWrite(4, 200);
analogWrite(3, 20);
analogWrite(2, 20);
delay(1000); // Wait for 1000 millisecond(s)
analogWrite(4, 100);
analogWrite(3, 255);
analogWrite(2, 0);
delay(1000); // Wait for 1000 millisecond(s)
analogWrite(4, 120);
analogWrite(3, 80);
analogWrite(2, 255);
delay(1000); // Wait for 1000 millisecond(
}
Hardware & Software stimulation

CONCLUSION:
The experiment successfully demonstrated how multiple Piezo buzzers can be used with
an Arduino to generate distinct and synchronized tones. This approach enhances the
potential applications of Piezo buzzers in various electronic and embedded systems.
PRACTICAL 8

AIM:To Control the color output of the RGB LED using Arduino Uno in
Tinkercad.

Code:

void setup() {
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(7, OUTPUT);
}

void loop(){
tone(7, 220, 100);
delay(200);
noTone(7);
delay(500);
for (int counter = 0; counter < 10; ++counter) {
tone(11, 523, 8000);
delay(407);
noTone(11);
tone(10, 831, 8000);
delay(407);
noTone(10);
tone(9, 4699, 8000);
delay(407);
noTone(9);
}

int counter;
}
Hardware & Software Stimulation.

CONCLUSION

In this experiment, an Arduino Uno was successfully used to control the color output of
an RGB LED in Tinkercad. By varying the intensity of the Red, Green, and Blue (RGB)
components through Pulse Width Modulation (PWM), different colors were generated.

You might also like