Skip to content
MPXMehPiX

Home

MehPiX software studio: projects, values, roadmap and partnerships.

Projects

All our projects: PyAI and Quiz.

PyAI

A single-file chatbot for Windows; download and file verification.

Quiz (Arduino)

Arduino arithmetic quiz: how to play, parts list and wiring table.

About

Our story, our values and our roadmap.

Contact

Send us a message or an email.

Frequently asked questions

Questions about MehPiX, PyAI, Quiz and downloads.

All projects

Quiz

Live
ArduinoC++

An arithmetic quiz game on Arduino: questions appear on an LCD screen, answers are picked with three buttons, and a buzzer plays sound effects and music.

v1.0.0 · Quiz.zip · 48 KB

Quiz is our first project combining software and hardware. Running on an Arduino Uno, this arithmetic quiz shows addition, subtraction, multiplication and division questions on a 16x2 LCD screen. You pick the answer with one of three buttons, while a buzzer plays the countdown, right and wrong sounds, and background music.

Features

  • Four operations

    Addition, subtraction, multiplication and division questions are generated at random, so every game is different.

  • Time and score

    20 seconds per question; a correct answer is worth 10 points. It beeps during the last 5 seconds.

  • Sound and music

    A start melody, right/wrong sounds and background music you can switch on and off.

  • Skip and pause

    Skip a hard question, or pause the game and resume whenever you like.

How to play

  1. Power the Arduino: after a welcome message the screen shows "Baslamak Icin Butona Bas" (press the button to start).

  2. Press the D2 button; the start melody plays and the first question appears.

  3. You have 20 seconds for each question. The timer counts down in the top right corner and beeps during the last 5 seconds.

  4. Pick your answer with button A (D8), B (D9) or C (D10). A correct answer is worth 10 points; after a wrong one the correct answer is shown.

  5. Press D2 briefly to skip a question, or hold it for 3 seconds to pause and resume the game.

  6. The music button (D11) turns the background music on and off. After 100 questions your total score appears on the screen.

Parts you need

  • Arduino Uno
  • 16x2 LCD screen (with I2C module, address 0x27)
  • 5 buttons (4 game buttons + 1 music button)
  • Buzzer or small speaker
  • Breadboard and jumper wires

The code uses the LiquidCrystal_I2C library, which you can install from the Library Manager in the Arduino IDE.

Wiring table

Which Arduino pin each component connects to. The buttons use the internal pull-up resistors, so no extra resistors are needed.

ComponentComponent pinArduino pinDescription
LCD screen (I2C)GNDGNDGround
VCC5VSupply voltage
SDAA4 (SDA)I2C data line (Uno)
SCLA5 (SCL)I2C clock line (Uno)
Button 1 (D2)First legDigital pin 2Start; short press: skip, long press: pause
Other legGND
Button 2 (D8)First legDigital pin 8Option A
Other legGND
Button 3 (D9)First legDigital pin 9Option B
Other legGND
Button 4 (D10)First legDigital pin 10Option C
Other legGND
Music buttonFirst legDigital pin 11 (mz_ak)Music on/off
Other legGND
Buzzer / speakerPositive (+) legDigital pin 6Sound effects and melodies (tone output)
Negative (−) legGND
Open the table as an image

What's in the zip?

Quiz.zip contains the Arduino code (Quiz.ino), the wiring table (BAGLANTI.md and an image), setup instructions (README.md) and the MIT license. Unzip it and open Quiz.ino from the Quiz folder in the Arduino IDE.

Verify the file

To check that the file you downloaded is the one we published, open PowerShell in the folder that contains it and run:

Get-FileHash .\Quiz.zip -Algorithm SHA256

The SHA-256 value it prints should match this one:

55d16d2400b53939f037d9aa250cf3e15df818cbdcac4d29edef54983e62d31f