PROBLEM т T 7 00 • Design a script to be implemented on the FPGA that solves the following problem: 5 6 3 4 ㅏ 2 Imagine a parking garage with a gate. The gate allows cars to enter: however, the driver must pay or have a permit for the gate to open. To eliminate car congestion in the garage, the driver can also know which floor to park in. Assuming there are two floors: first floor has 8 spots and second floor has 8 parking spots, design a script that will open the gate with input from weight sensors at the garage parking spots. If the garage is full the gate will not open. Conditions: • Parking must be filled in order to reduce congestion • display number of parking spot Display the floor to park Use seven seg Gate .

Respuesta :

1. Create a variable, let's call it "parking_spots". Set it to 16 (8 for each floor).

2. Create a variable, let's call it "current_floor". Set it to 1.

3. Create a variable, let's call it "max_floor". Set it to 2.

4. Create a variable, let's call it "open_gate". Set it to 0.

5. Create a loop that will run continuously.

6. Within the loop, read the input from the weight sensors.

7. If the weight sensor input is greater than 0, increment the "parking_spots" variable.

8. If the "parking_spots" variable is greater than 0, open the gate (set "open_gate" to 1).

9. If the "parking_spots" variable is 0, do not open the gate (set "open_gate" to 0).

10. Display the number of parking spots on the seven seg display.

11. If the "open_gate" variable is 1, open the gate and display the floor to

what do you mean by variable?

A variable is a symbolic name associated with a value that can be changed. In programming, a variable is a location in memory used to store a value that can be modified during program execution. Variables are often used to store user input, program results, and other values. Variables have a type, name, and value, which can be changed or updated during program execution. Variables are essential in programming as they allow us to store and manipulate data.

To learn more about variable..
https://brainly.com/question/17169621
#SPJ4