In: Electrical Engineering
Write a VHDL code to use two ultrasonic sensors as detectors, placed one at entrance and other at exit of a parking space. When the ultrasonic detects a car, use a counter to count the cars entering and decrement when a car exits. There is an RGB led place at each gate (entry &exit) which is used to indicate opening and closing of gates. Entry gate LED turns green when car detected and space available. LED stays red when no car detected, or car detected but no space available. Exit LED stays red but turns green when car detected by ultrasonic.