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
Build Your Own Gps Tracking System using Arduino
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
ESP32 Interfacing With LDR Sensor
How To Make RFID & Keypad Based Door Lock
GPS Tracker Using Nodemcu
ESP32 Interfacing Potentiometer
Smart Street Light Using Arduino
Esp32 Cam Based Face Unlock
Arduino ebook
IoT Weight Scale using Load Cell HX711 & ESP8266
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