Home
About Us
Achievement
Home
Raspberry-Pi Projects
_Raspberry Pi 4 Complete Guide
Arduino Project
_All Projects
Esp8266 Project
_All Projects
Esp32 Project
_Automation-with-feedback
Light On And Off Controling Using Touch Sensor
Just Do Electronics
April 14, 2020
Touch Sensor And Relay Based Light Control System Using Arduino
Circuit Diagram :-
Code :-
//Prateek //www.prateeks.in #include
LiquidCrystal lcd(12,11,10,9,8,7); int touchPin = 2; int relayPin = 3; int val = 0; int lightON = 0; int touched = 0; void setup() { lcd.begin(16,2); lcd.print(" Touch Based"); lcd.setCursor(0, 1); lcd.print("Door Lock System"); Serial.begin(9600); pinMode(touchPin, INPUT); pinMode(relayPin, OUTPUT); } void loop() { val = digitalRead(touchPin); if(val == HIGH && lightON == LOW){ touched = 1-touched; delay(100); } lightON = val; if(touched == HIGH){ Serial.println("Light ON"); lcd.clear(); lcd.print("Status: OFF"); lcd.setCursor(0, 1); lcd.print("Touch to ON"); digitalWrite(relayPin, LOW); }else{ Serial.println("Light OFF"); lcd.clear(); lcd.print("Status: ON"); lcd.setCursor(0, 1); lcd.print("Touch to OFF"); digitalWrite(relayPin, HIGH); } delay(100); }
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
Smart Street Light Using Arduino
IoT Based Patient Health Monitoring System Using Blynk App
Esp32 Cam Based Face Unlock
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
How To Make RFID & Keypad Based Door Lock
ESP32 And Fingerprint Sensor Based Biometric Door Lock Security System
How to Make a Conveyor Belt System | Counter Machine
MLX90614 Non-Contact Infrared Thermometer With Arduino
Ultrasonic Sensor as a Counter with Arduino
YouTube
Like on Facebook
Follow on Twitter
Follow on Google+
Follow on Instagram
Subscribe on Youtube
Hi WelCome To My Website If you have a creative mind and want to learn Electronics even without studying it then FRIENDS this Website And Youtube Channel is for you, I am crazy creators who love making Electronics things. I have a bunch of more than 130 Tutorial Videos on My YouTube Channel and I upload a new Tutorial every Sunday.
Tags
Arduino Project
Esp32 Project
Esp8266 Project
0 Comments