-- Let sensor_in represents pressure sensor inside the garage
-- where as sensor_out represents pressure sensor outside the garage.
library ieee;
use ieee.std_logic_1164.all
entity garage is
port (sensor_in, sensor_out : in std_logic;
gate_open : out std_logic
);
end garage;
architecture arch of garage is
begin
gate_open <= sensor_out and (not sensor_in);
end arch;
Improvement: Instead of using dual pressure sensor comprising of strain guage, bridge network, signal conditioning we can use IR/Ultra sonic sensor at the proximity of garage entrance. IR/Ultra sonic sensor can flag the presence of vehicle inside or reset the flag to allow a vehicle inside the garage.
Bonus Question (5pts). Suppose I have an electrically operated garage door and I want to design...