Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you write code based on CPUlator's ARMv 7 DE 1 - SoC system containing an ARMv 7 processor ? Figure 2 . FlowcCan you

Can you write code based on CPUlator's ARMv7 DE1-SoC system containing an ARMv7processor?
Figure 2. FlowcCan you write code based on CPUlator's ARMv7 DE1-SoC system containing an ARMv7processor?Can you write code based on CPUlator's ARMv7 DE1-SoC system containing an ARMv7processor?hart of the game.
Explanation of the Game
"Calculate the Sum" is an addition skill game played using 7-Segment Display and Push button.
The aim of the game is to collect 5 randomly appearing numbers between 1 and 9 each time
and get the correct answer.
The gameplay is as follows:
By pressing "Push Button 3"5 times, different random numbers are generated each time and
the number is displayed on the screen. These numbers that appear each time are added up.
Then, by pressing the 1 and 2 Push Buttons, a total of 7 segments between 0 and 100 are
selected on the display. (Push button number 1 increases, push button number 2 decreases.)
After the total found by the user is seen on the screen, push button number 0 is pressed and the
program says it is true or false.
Figure 1. Example Game Session
main_loop is the main subroutine from which the code is executed. The wait_timer subroutine is
the timer that works to generate random numbers. The key_press subroutine is the subroutine
used to understand which key was pressed. increment_value, decrement_value are subroutines
that increase and decrease the value entered by the user on the screen. capture_value,
add_loop, capture_numbers are the necessary subroutines for summing the selected numbers.
The compare, won_display, fail_display subroutines compare the value entered by the user and
calculated by the machine and tell the user the result of the game.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

Students also viewed these Databases questions