Mastermind - Logik - Via Arduino and LCD

by martinius96 in Circuits > Arduino

410 Views, 0 Favorites, 0 Comments

Mastermind - Logik - Via Arduino and LCD

Mastermind - Arduino - DEBUG OFF

Hi, I'd like to introduce today my implementation for Mastermind, also known as Logik. In this implementation, the player does not guess the colors and their order as in the original - table version played by two players, but guesses the numbers and their order. It should be stressed that numbers cannot be repeated. The task of determining numbers and their order is Arduino, which generates them.

Mastermind - Funcionality

mastermind2.jpg
mastermind.jpg
mastermind1.jpg

Arduino continues to serve as an experiment counter and receives logic inputs via 5 buttons that switch against the ground (INPUT_PULLUP). Use the buttons to enter the user input in the form of numbers for positions. The last button confirms the entry and sends it to Arduino. In addition to the current user input, the LCD also shows the result.

If the user does not guess the number or the position, the display will show the corresponding position - if he guesses the number with the position, = will be displayed; if he guesses the number but not the position, C will be displayed. uncomment. In principle, it only displays the searched number on the display if the developer wants to test the functionality of the individual elements and to verify whether the game ends after attempting or guessing the searched number.

The game is limited to 10 player attempts. If the number of attempts is exceeded, the game is terminated with a message about the player's loss. If the player guesses the target number, the game ends with a statement of the player's winnings. The game is not limited in time. In the game, it is recommended to use pencil and paper to write entries, which can lead to a statistical advantage in finding the target number.

Schematics + Source Codes

schema_mastermind.png

Source codes available at: https://arduino.php5.sk/mastermind-arduino.php?lang=en or ask for them at: martinius96@gmail.com