Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022-018
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2022-018
2022-018
Commits
969dd7af
Commit
969dd7af
authored
May 13, 2022
by
Peellapitiya D I IT19111902
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
e29eb920
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
84 additions
and
0 deletions
+84
-0
Passive_infared_sensor_implementation.txt
Passive_infared_sensor_implementation.txt
+84
-0
No files found.
Passive_infared_sensor_implementation.txt
0 → 100644
View file @
969dd7af
#include <dht.h>
dht PIR;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(2,INPUT);
pinMode(9,OUTPUT);
pinMode(3,INPUT);
pinMode(10,OUTPUT);
pinMode(4,INPUT);
pinMode(11,OUTPUT);
pinMode(5,INPUT);
pinMode(12,OUTPUT);
pinMode(6,INPUT);
pinMode(13,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
//dht 11 sensor val
int val = PIR.read11(7);
int val2 = digitalRead(2);
int val3 = digitalRead(3);
int val4 = digitalRead(4);
int val5 = digitalRead(5);
int val6 = digitalRead(6);
if(val2 == 1){
digitalWrite(9,HIGH);
}
else{
digitalWrite(9,LOW);
}
if(val3 == 1){
digitalWrite(10,HIGH);
}
else{
digitalWrite(10,LOW);
}
if(val4 == 1){
digitalWrite(11,HIGH);
}
else{
digitalWrite(11,LOW);
}
if(val5 == 1){
digitalWrite(12,HIGH);
}
else{
digitalWrite(12,LOW);
}
if(val6 == 1){
digitalWrite(13,HIGH);
}
else{
digitalWrite(13,LOW);
}
//for humidity controller and temprature capture
Serial.print("Temperature = ");
Serial.print(PIR.temperature);
Serial.print("\t Humidity = ");
Serial.println(PIR.humidity);
delay(1000);
}void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment