Dithira Hettiarachchi
Published

Room automation

Basically this system lights up your room.

BeginnerFull instructions provided769
Room automation

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
PIR Sensor, 7 m
PIR Sensor, 7 m
×1
L:DR module
×1
LED (generic)
LED (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Schematics

Home automation

if your project doesn't work try changing the values in the sensors

Code

Home automation

Arduino
void setup() {
  pinMode(13,OUTPUT);
  pinMode(8,INPUT);
  pinMode(7,INPUT);
}

void loop() {
  int val = digitalRead (8);
  int light = digitalRead(7);

  if (light == 1)
  if (val == 1){
    digitalWrite(13,HIGH);
  }
  else{
    digitalWrite(13,LOW);
  }
}

Credits

Dithira Hettiarachchi
7 projects • 6 followers
Python Cooking Web3

Comments