Question

need this in beginner arduino coding (simple )ARDUINO 1. Complete the following problem using Arduino IDE Write a program to detect the temperature of the environment and provide audio and visual cue to user using LED, and Piezo sensor to notify the occupants about a potential fire in the building. In addition, upon fire detection entrance and exit should be opened using a servo motor. (a) Items used & Circuit Schematic (5points) (b) All sensor functionality included based on project specifications (10points) (c) Code runs without error (10points) (d) Conclusion (5points)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

You require following parts
1-ARDUINO BOARD (uno)
2-LM35 TEMPERATURE SENSOR
3-USB CABLE
4-COMPUTER WITH ARDUINO SOFTWERE

5-LED

6- Piezo Speaker

7- 100 ohm and 150 ohm resistors

8- servo motor SG-90

Arduino code:-

#include <Servo.h>
int val;
int tempPin = 1;
int Ledpin=2;
int sound=3;
int servoPin = 5;
// Create a servo object
Servo Servo1;

void setup()
{
Serial.begin(9600);
pinMode(Ledpin, OUTPUT);
pinMode(sound, OUTPUT);
Servo1.attach(servoPin);
}

void loop()
{
val = analogRead(tempPin);
float mv = ( val/1024.0)*5000;
float cel = mv/10;
if(cel > 35)
{
digitalWrite(Ledpin, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(sound, HIGH); // turn the LED on (HIGH is the voltage level)
// Make servo go to 180 degrees
Servo1.write(180);
delay(1000);
}
digitalWrite(Ledpin, LOW); // turn the LED off by making the voltage LOW
digitalWrite(sound, LOW); // turn the LED off by making the voltage LOW
// Make servo go to 0 degrees
Servo1.write(0);
delay(1000);

Serial.print("TEMPRATURE = ");
Serial.print(cel);
Serial.print("*C");
Serial.println();

}

compiling without errors:-

conclusion:-

This project is used for detect the fire and alerts the people by using buzzer (beep sound) and light (visual). The main advantage of this project is the people who cannot hear the sound properly, they can be notified by the light

and the people who cannot see properly can be notified by the sound and opens the door for them...

Add a comment
Know the answer?
Add Answer to:
need this in beginner arduino coding (simple ) ARDUINO 1. Complete the following problem using Arduino...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT