Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
The importance and usefulness of the Alarm+Feature
The Alarm+Feature is a project that combines the functionalities of an alarm system with additional features that can be customized according to specific needs. This project is particularly useful for home automation and security applications, as it allows users to create a flexible and personalized alarm system.
By using Arduino and various components, the Alarm+Feature project can be easily implemented and expanded upon. The project offers a wide range of functionalities, such as motion detection, door/window opening detection, temperature monitoring, and more. These features can be combined or used individually, depending on the requirements of the user.
Project: The Alarm+Feature project aims to create a customizable alarm system that can be easily integrated into existing home automation setups. The project includes the following objectives and functionalities:
List of components:
Examples:
Example 1: Motion detection
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define PIR_PIN 2
#define LED_PIN 13
Adafruit_BME280 bme;
void setup() {
pinMode(PIR_PIN, INPUT);
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
if (!bme.begin(0x76)) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1);
}
}
void loop() {
int motion = digitalRead(PIR_PIN);
if (motion == HIGH) {
digitalWrite(LED_PIN, HIGH);
Serial.println("Motion detected!");
float temperature = bme.readTemperature();
float humidity = bme.readHumidity();
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" °C, Humidity: ");
Serial.print(humidity);
Serial.println(" %");
} else {
digitalWrite(LED_PIN, LOW);
}
delay(1000);
}
Example 2: Door/window opening detection
#define DOOR_PIN 3
#define LED_PIN 13
void setup() {
pinMode(DOOR_PIN, INPUT);
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
}
void loop() {
int doorStatus = digitalRead(DOOR_PIN);
if (doorStatus == HIGH) {
digitalWrite(LED_PIN, HIGH);
Serial.println("Door/window opened!");
} else {
digitalWrite(LED_PIN, LOW);
}
delay(1000);
}
Example 3: Temperature monitoring
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#define TEMP_PIN A0
#define LED_PIN 13
Adafruit_BME280 bme;
void setup() {
pinMode(LED_PIN, OUTPUT);
Serial.begin(9600);
if (!bme.begin(0x76)) {
Serial.println("Could not find a valid BME280 sensor, check wiring!");
while (1);
}
}
void loop() {
int tempReading = analogRead(TEMP_PIN);
float temperature = map(tempReading, 0, 1023, -40, 85);
if (temperature > 30) {
digitalWrite(LED_PIN, HIGH);
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
} else {
digitalWrite(LED_PIN, LOW);
}
delay(1000);
}