Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will be creating a game in C++ for your Arduino called Time bomb. The game randomly generates a disarming code and gives the player

You will be creating a game in C++ for your Arduino called "Time bomb." The game randomly generates a disarming code and gives the player a 25-second time limit countdown to 0. The countdown is displayed on the 8-segment display from 0025 down to 0000. The disarming code is input by the player using the three pushbuttons (A1, A2, and A3). The disarming code is some random combination of these buttons. For example, if I generate a code of 0, 2, 2, 1, then I must press the left button, the right button twice, and then the middle button to disarm the bomb. If I do not press the correct button, the player must enter the code starting from the beginning. Every time the user presses the correct button, you will light an LED from bottom to top. If the user presses the wrong button, then clear all LEDs so the user can start over again. The player wins by lighting all four LEDs, meaning they inputted the correct 4-button sequence. If the user presses the correct four button sequence, display dashes (----) for 3 seconds, and then start the game from the beginning. If the user does not press the correct four button sequence and the time limit counts down to 0, then you will display all zeroes (0000) for 3 seconds. During these 3 seconds, sound the buzzer (pin 3) to simulate a "time bomb" sound. After the 3 seconds, restart the game with a new, random, 4-button disarming code and 25-second time limit.

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

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago