Update your browser to view this website correctly. Update my browser now
Project #17: Making a Binary Quiz Game
In this project we’ll use random numbers, the Serial Monitor, and the circuit created in Project 16 to create a binary quiz game. The Arduino will display a random binary number using the LEDs, and then you will enter the decimal version of the binary number using the Serial Monitor. The Serial Monitor will then tell you whether your answer is correct and the game will continue with a new number.
The Algorithm The algorithm can be divided into three functions. The displayNumber() function will display a binary number using the LEDs. The getAnswer() function will receive a number from the Serial Monitor and display it to the user. Finally, the checkAnswer() function will compare the user’s number to the random number generated and display the correct/incorrect status and the correct answer if the guess was incorrect.