Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

Students also viewed these Databases questions

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago