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
Touch Sensor Based Door Lock System Using Arduino
Just Do Electronics
April 10, 2020
Touch Sensor And Servo Motor Based Door Lock System Using Arduino
Circuit Diagram :-
Code :-
//Prateek //www.prateeks.in #include
#include
LiquidCrystal lcd(12,11,10,9,8,7); const int servoPin = 3; const int touchPin = 2; int ledPin = 13; int touchState = 0; int directionState = 0; Servo myservo; int pos = 0; void setup() { lcd.begin(16,2); lcd.print(" Touch Based"); lcd.setCursor(0, 1); lcd.print("Door Lock System"); myservo.attach(3); pinMode(touchPin, INPUT); pinMode(ledPin, OUTPUT); } void loop(){ touchState = digitalRead(touchPin); if (directionState == 0){ if (touchState == HIGH) { directionState = 1; for(pos = 0; pos < 180; pos += 1) digitalWrite(ledPin,1); lcd.clear(); lcd.print("Status: Locked"); lcd.setCursor(0, 1); lcd.print("Touch to Unlock"); { myservo.write(pos); delay(15); // waits 15ms to reach the position } } } else if (directionState == 1) { if (touchState == HIGH) { directionState = 0; for (pos = 180; pos>=1; pos -=1) digitalWrite(ledPin,0); lcd.clear(); lcd.print("Status: Unlocked"); lcd.setCursor(0, 1); lcd.print("Touch to Lock"); { myservo.write(pos); delay(15); } } } }
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
Measure CO2 Level in Air Using Arduino
IoT Based Patient Health Monitoring System Using Blynk App
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
ESP32 Led Blink With Push Button
Esp32 Cam Based Face Unlock
NRF Based Servo Motor Control
Smart Street Light Using Arduino
Home Security System Using Arduino, Pir Sensor And GSM Sim900A
Make Fingerprint Door Lock | Arduino Project
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