Professional Documents
Culture Documents
Design Document
By:
Eman mohamed Tawfik ID:4121006
Sandra Samaan ID:4121037
Eman Nagy ID:4121026
Mahmoud Atef ID:4121067
Mostafa Hossam Eldin ID:4121042
Function that we uses in our project code:
First we will declare global the variables we needs.
Then declare the pins' variables 3 digital pins for the alarm or the
buzzer, the button and the led and 1 analog pin for the smoke
sensor.
1) Void setup () {
Setup the digital pins that we will use to the alarm, the led and the button.
}
2) Void loop () {
Call the defined functions which are:
4) Void OpenAlarm(SmokeValue) {
Open the alarm (make the alarm (buzzer) make sound) when the smoke
value exceeds a specific value.}
5) Void OpenLed(SmokeValue) {
Open the led when the value is exceed a specific value and make it
blinking. }
6) Void CloseAlarm(buttonState) {
Close the alarm when the button is pressed.
}
Flow chart :