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
Advance Car Parking Project
Just Do Electronics
April 03, 2020
Circuit Diagram :-
Code :-
//Prateek //wwww.prateeks.in //https://www.youtube.com/c/JustDoElectronics/videos #include
LiquidCrystal_I2C lcd(0x27, 16, 2); #include
Servo myservo1; int ir_s1 = 2; int ir_s2 = 4; int Total = 5; int Space; int flag1 = 0; int flag2 = 0; void setup() { pinMode(ir_s1, INPUT); pinMode(ir_s2, INPUT); myservo1.attach(3); myservo1.write(100); lcd.init(); lcd.backlight(); lcd.setCursor (0, 0); lcd.print(" Car Parking "); lcd.setCursor (0, 1); lcd.print(" System "); delay (2000); lcd.clear(); Space = Total; } void loop() { if (digitalRead (ir_s1) == LOW && flag1 == 0) { if (Space > 0) { flag1 = 1; if (flag2 == 0) { myservo1.write(0); Space = Space - 1; } } else { lcd.setCursor (0, 0); lcd.print(" Sorry not Space "); lcd.setCursor (0, 1); lcd.print(" Available "); delay (1000); lcd.clear(); } } if (digitalRead (ir_s2) == LOW && flag2 == 0) { flag2 = 1; if (flag1 == 0) { myservo1.write(0); Space = Space + 1; } } if (flag1 == 1 && flag2 == 1) { delay (1000); myservo1.write(100); flag1 = 0, flag2 = 0; } lcd.setCursor (0, 0); lcd.print("Total Space: "); lcd.print(Total); lcd.setCursor (0, 1); lcd.print("Have Space: "); lcd.print(Space); }
Github Link :-
Code And Library
Video :-
0 Comments
Newer
Older
ESP32 Interfacing With LDR Sensor
Build Your Own Gps Tracking System using Arduino
IoT Based Fingerprint Biometric Attendance System Using NodeMCU (Esp8266)
Ultrasonic Sensor as a Counter with Arduino
ESP32 Led Blink With Push Button
ESP32 Interfacing Potentiometer
Measure CO2 Level in Air Using Arduino
Play Audio Sound With Esp8266 With Blink App
IoT Based Patient Health Monitoring System Using Blynk App
Vehicle Accident Alert System Using Accelerometer GPS And GSM
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