Posts

Showing posts from July, 2018

Automatic lighting system with Arduino

Image
How to create a automatic lighting system with Arduino Contents:- 1. Arduino Uno 2.LCD display 16*2 3. PIR motion sensor 4. 5V Relay 5. lithium ion battrery or any battery whuch give 5v 6.In place of battery you can also use 12v adapter,which i had used in this project       Connections:- 1. See from the code Working Mechanism:- Fit this box on the wall at height of 6 ft approx  when someone enters the door PIR value becomes HIGH and the condition becomes true which signals the arduino to turn the relay to LOW which makes the light on. Code to upload:- const int ledPin = 13; int RELAY = 8; int PIR=9; // output of pir sensor #include <LiquidCrystal.h> // includes the LiquidCrystal Library  LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Creates an LC object. Parameters: (rs, enable, d4, d5, d6, d7)  void setup() { Serial.begin(9600); pinMode(RELAY, OUTPUT); pinMode(PIR, INPUT);// setting pir output as ardu