Posts

Showing posts with the label er bros lab

all about Ultrasonic sensor

Image
 Hi friends. here is the diagram :-  here is code :- ---------------------------------------------------- /*  * Distance measurement using HC SR04 ultrasonic sensor and i2c 16x2 lcd  * ER BROS LAB  */ #include <Wire.h> #include <LiquidCrystal_I2C.h> #define trigger 12 #define echo 13 LiquidCrystal_I2C lcd(0x27, 16, 2); float t = 0, distance = 0; void setup() {   lcd.begin();   lcd.backlight();   delay(100);   pinMode(trigger, OUTPUT);   pinMode(echo, INPUT);   lcd.print("Ultra sonic");   lcd.setCursor(0, 1);   lcd.print("Distance Meter");   delay(2000);   lcd.clear();   lcd.print("ER BROS LAB");   delay(2000); } void loop() {   lcd.clear();   digitalWrite(trigger, LOW);   delayMicroseconds(2);   digitalWrite(trigger, HIGH);   delayMicroseconds(10);   digitalWrite(trigger, LOW);   delayMicroseconds(2);   t = pulseIn(echo, HIGH);   distance = t * ...

PIR sensor with and without arduino

Image
Hello guys here you can see how interface PIR sensor with and without arduino board. use of this sensor is very easy , by connecting some wires as shown in diagram you can use this sensor. here is circuit diagram :- After connection as per diagram you need to upload this simple code :- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #define pir 10 #define op 13 int val; void setup() {   pinMode(pir, INPUT);   pinMode(op, OUTPUT); } void loop() {   val = digitalRead(pir);   if(val == HIGH) {     digitalWrite(op, HIGH);   }   else {     digitalWrite(op, LOW);   } } -----------------------------------------------------------------------------------------------------------------------...

Simple Home Automation

Image
Hi This is the simplest home automation using HC-05 Bluetooth module. parts you need...              components                                                                                  buy link Arduino Uno (any arduino works)                                 https://amzn.to/2MUYONt Bluetooth module                                                           https://amzn.to/2AyfN5t Relay module                                ...