Question
build a circuit based on this code with lcd and IR sensor use any software to implmented, attach like please #define Park_capc 50 #define Entry_sensor
build a circuit based on this code with lcd and IR sensor use any software to implmented, attach like please
#define Park_capc 50 #define Entry_sensor 2 #define Exit_sensor 3 #define entry_door_motor 4 #define exit_door_motor 5 int carCount = 0; void setup() { pinMode(Entry_sensor, INPUT); pinMode(Exit_sensor, INPUT); pinMode(entry_door_motor, OUTPUT); pinMode(exit_door_motor, OUTPUT); } void loop() { if(digitalRead(Entry_sensor) == HIGH) { if(carCount < Park_capc) { digitalWrite(entry_door_motor, HIGH); delay(1000); digitalWrite(entry_door_motor, LOW); carCount++; } } if(digitalRead(Exit_sensor) == HIGH) { if(carCount > 0) { digitalWrite(exit_door_motor, HIGH); delay(1000); digitalWrite(exit_door_motor, LOW); carCount--; } } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started