Master Mind Game using RaspberryPi

Hardware Specifications

Electronic Components used:

  • RaspberryPi 3
  • 1 16X2 LCD
  • 2 LED
  • 1 Potentiometer
  • 1 Button
  • 1 Bread Board
  • 3 Resistors
  • Wires
  • Circuit:

    RaspberryPi electronic circuit using bread board

    Debug Mode Sample

    The following figure shows a debug mode sample. The program starts by asking the user for the colors count and the sequence size that the user has to guess. Each color is represented by a number. The user chooses 3 colors and a sequence size of 3. In debug mode the secret is printed which is "2 1 2". After every guess the program tells the user the number of exact matches followed by the number of approximate matches. On a RaspberryPi the input is through the single button and the user gets the output as several LED blinks. So an input of "2 1 2" would be represented by 2 button presses, then wait for a blink, then one button press, then wait for blink, then finally 2 button presses. Getting 2 exact matches and 1 approx. would be represented by 2 (green) blinks, then a separator blink of another color(white), then another (green) blink.

    RaspberryPi command line

    Omar Basem